This was actually discussed a couple weeks ago ... The quick summary is that you CAN access Application, but you should feel dirty doing it. The problem you will run into is that you may want to use your EO's outside of the context of a full blown running Application, and you're stuck with this odd dependency in the middle of your model layer.

A possible alternative would be to have a singleton ApplicationSettings class that Application pushes values into, but that you can talk to from your model without dragging in WOApplication dependencies along the way.

ms

On Aug 26, 2006, at 12:52 AM, Joe Little wrote:

The subject should be referencing Application class from non- component classes.

On 8/25/06, Joe Little <[EMAIL PROTECTED]> wrote:
I'm trying to do something which I think is invalid.

In my app I read in Properties file values in the Application class in
an instance variable there. Throughout my components I can reference
them like:

((Application)application()).AdmitProps.evalGlobal()

Sadly, it would appear that in my base EO classes, I cannot reference
Application similarly, as Xcode gives me an unresolved symbol. Is
there no way to reference these instance variables from classes as
such?

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag% 40mdimension.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to