On 8/25/06, Mike Schrag <[EMAIL PROTECTED]> wrote:
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.
Any examples of the dirty way? I'll check the backlog of emails as well.
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.
Hm.. I thought I did this already. I currently reference an instance of class with all my values that is instantiated by Application. The only reference of the instance if via the Application, so I'm obviously missing some fundamental design pattern I haven't touched upon before.
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 (Webobjects-dev@lists.apple.com) > 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 (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/jmlittle%40gmail.com This email sent to [EMAIL PROTECTED]
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to archive@mail-archive.com