• 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: An Apps Session from a Framework
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: An Apps Session from a Framework


  • Subject: Re: An Apps Session from a Framework
  • From: "Jonathan 'Wolf' Rentzsch" <email@hidden>
  • Date: Fri, 30 Apr 2004 00:28:05 -0500

Chuck Hill, email@hidden, wrote:
>Put a WOSession sub-class in the framework, say UserSession. Make this
>implement setUser, setEntry etc etc.  Cast to this session in the FW.
>In the Application make Session extend UserSession instead of
>WOSession.  Or create an interface with    setUser, setEntry etc etc.
>and cast to this and have Session implement the interface.

That's a good type-safe way. Another, dynamic way, is to use KVC:

>        Session sess = (Session)session();
>        sess.setUser(null);
>        sess.setEntry(null);
>        sess.setUsername(null);
>        sess.terminate();

WOSession sess = session();
session.takeValueForKey( null, "user" );
session.takeValueForKey( null, "entry" );
session.takeValueForKey( null, "username" );
sess.terminate();

I think Chuck's idea is better, but it helps to know your options.

| Jonathan 'Wolf' Rentzsch   http://rentzsch.com
| Red Shed Software           http://redshed.net
|     "better" necessarily means "different"
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: An Apps Session from a Framework
  • Next by Date: Re: EOF & pgSQL join syntax
  • Previous by thread: Re: An Apps Session from a Framework
  • Next by thread: deploy webobjects in servlet
  • Index(es):
    • Date
    • Thread