On Mon, Jun 30, 2008 at 9:46 AM, Michael Kaye <[EMAIL PROTECTED]> wrote:
> So my question (finally) is where do I store the sessionid variable so it is
> accessible through out all classes and for as long as the app is running?
>
> My current approach is to save the value in an Extern NSString but I'm not
> convinced this is correct. I feel like the class that handles the login
> ought to maintain it some how, but if so how do I keep it alive and
> accessible after I release the login class object?
>
> I hope makes some sense and hopefully someone can provide me with a few
> pointers.

I don't see that the login object needs to be released at all.

Logically, the login object is the one responsible for obtaining the
session id, so it "owns" the session id. Maybe have the login object
be a singleton, so you can always access the instance, and give it an
accessor for the session id. Conceptually, think of the singleton
login object as "authentication to the server". It can give an opaque
certificate of authentication, in the form of the session id.

Owen
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to