Page 1 of 1

class loading newbie error!

PostPosted: Fri Mar 18, 2011 9:05 am
by tomwrobel
Hi All

I'm having a look at xataface for a lightweight DB application I'm building - and I'm very impressed. However, I'm trying to go through the tutorial and hitting a problem with delegate classes (this has also happened with another delegate class I tried to create).

Fatal error: Class 'conf_ApplicationDelegate' not found in /[PATH-TO-XATAFACE]/xataface/Dataface/Application.php on line 1160

I assume that the class loader isn't finding the relevant file, but it's in the conf directory root (in the root of the application folder), and correctly named.

Any tips appreciated!

blue skies

Tom

--
Tom Wrobel
APGRD - Archive of Performances of Greek and Roman Drama

Re: class loading newbie error!

PostPosted: Fri Mar 18, 2011 9:28 am
by shannah
You have created a delegate class file in conf/ApplicationDelegate.php but the class in there must be named incorrectly.

The class should be named conf_ApplicationDelegate

-Steve

Re: class loading newbie error!

PostPosted: Fri Mar 18, 2011 9:34 am
by tomwrobel
Dear Steve

Many thanks for the quick reply!

Unfortunately, the class is already named conf_ApplicationDelegate. I couldn't get another similar error to work so I thought I'd go through the relevant steps in the tutorial, the class is copy/pasted from that tutorial.

Now I think about it, I couldn't get images or css files to load either (had to copy them into the application folder which is a subfolder of the xataface folder). Have I munged-up a configuration setting somewhere?

blue skies

Tom

Re: class loading newbie error!

PostPosted: Fri Mar 18, 2011 9:43 am
by tomwrobel
OK, so I've worked it out. It's a facepalm moment!

I've got php short tags disabled, so <? at the start of the php file (from the tutorial example) wasn't working. You might want to amend the tutorial examples to stop similar idiots making the same mistakes :)

blue skies

Tom