• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: referencing Application classes from non-component classes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: referencing Application classes from non-component classes


  • Subject: Re: referencing Application classes from non-component classes
  • From: Mike Schrag <email@hidden>
  • Date: Sat, 26 Aug 2006 01:03:32 -0400

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@hidden> 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@hidden)
Help/Unsubscribe/Update your Subscription:
40mdimension.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Re: referencing Application classes from non-component classes
      • From: "Joe Little" <email@hidden>
References: 
 >referencing Application classes from non-component classes (From: "Joe Little" <email@hidden>)
 >Re: referencing Application classes from non-component classes (From: "Joe Little" <email@hidden>)

  • Prev by Date: Re: referencing Application classes from non-component classes
  • Next by Date: Re: Re: referencing Application classes from non-component classes
  • Previous by thread: Re: referencing Application classes from non-component classes
  • Next by thread: Re: Re: referencing Application classes from non-component classes
  • Index(es):
    • Date
    • Thread