Delegate Classes

A place for users and developers of the Xataface to discuss and receive support.

Postby zopemgr » Tue Apr 11, 2006 1:07 pm

While trying to implement Delegate Classes, I receive the following:

Fatal error: Cannot instantiate non-existent class: tables_employee in /usr/src/dataface/Dataface/Table.php on line 662

The /tables/employee/employee.php file has the following contents:




The "<" and "?" are properly placed together no space on the first line but will not print here.
zopemgr
 
Posts: 66
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Tue Apr 11, 2006 1:37 pm

The name of the class should be 'tables_employee' and not 'tables_Program'. The delegate class takes on the name of the table for which it is delegate.

Hope this helps.
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby rhumbfish » Tue Apr 11, 2006 2:05 pm

Yikes, ok I am a bonehead for missing that one. Your solution helps but now I get the following at the top of the output page:

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/data-dist/webmail/admiral/tables/employee/employee.php:13) in /usr/src/dataface/Dataface/TableView.php on line 480

In other words, this message shows up where the Title should be.
rhumbfish
 

Postby shannah » Tue Apr 11, 2006 2:52 pm

This error indicates that there must be some white space after the last ?> tag in your delegate class file. You cannot even have a return after it.

If your text editor still makes it appear that there is no white space at the end, then the text editor must be adding and suppressing some hidden characters. Let me know if it still gives you problems.

-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby zopemgr » Tue Apr 11, 2006 3:09 pm

Done. I was using vi and mistakenly put a CR at the end. :-/
Many many thanks!
zopemgr
 
Posts: 66
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 3 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved