Re: An Apps Session from a Framework
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.