• 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: Reference current session...common accessor ??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reference current session...common accessor ??


  • Subject: Re: Reference current session...common accessor ??
  • From: LD <email@hidden>
  • Date: Sat, 2 Jul 2005 02:53:44 +1000

Hi Nathan,

On 02/07/2005, at 1:03 AM, Nathan Walker wrote:

I have these declarations all over:

Session sess = (Session)session();

In order to set things in the current session. I know I could create a superclass with that in it and just have all my components subclass that but seems unneccessary. Am I missing something here. I use this in the Direct Action class a lot to. Do I really have to declare that at the top of all my class files that I intend to reference my session object?  It seems so common to set stuff on the current session.  There must be someway else..

This is a product of Java's strong typing :-/, so yes you'll need to (cast) from the inherited method unless you roll your own.

Alternatively, try using using the NSKeyValueCoding interface... (at least for instance methods/variables) e.g.,
session().valueForKey("methodOrVariableName");
session().takeValueForKey(someObject, "methodOrVariableName");

with regards,
--

LD


 _______________________________________________
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

References: 
 >Reference current session...common accessor ?? (From: Nathan Walker <email@hidden>)

  • Prev by Date: Re: Wonder binary releases (Was: PostgreSQL plugin)
  • Next by Date: Re: Reference current session...common accessor ??
  • Previous by thread: Reference current session...common accessor ??
  • Next by thread: Re: Reference current session...common accessor ??
  • Index(es):
    • Date
    • Thread