Am 05.08.2014 um 16:54 schrieb Klaus Berkling <[email protected]>:
> > On Aug 5, 2014, at 1:04 AM, René Bock <[email protected]> wrote: > >> But my tests shows, that the WOSession.SessionDidTimeOutNotification is send >> every time a session terminates – regardless if the session was timed out or >> terminated explicitly >> . >> Which is bad, as I only want to take an action on session time out :-( > > > Can you set a flag in your session class when someone explicitly terminates > the session, in your logout code? Then act accordingly in terminate() if the > flag was not set? > Yes, but i preferred this one: public void terminate() { if(this.toString().contains("_wasTimedOut=true")) { NSNotificationCenter.defaultCenter().postNotification(MySessionWillTimeOutNotification, sessionID()); } super.terminate(); } _wasTimedOut is set to true only when session.terminate() is called when the session time out is reached. But unfortunately, _wasTimedOut is a private instance variable from WOSession :-( > > kib > > "Some people never see the light, Till it shines through bullet holes." > Tropic Moon, Burce Cockburn > > Klaus Berkling > www.berkling.us | @kiberkli | Photography > > > > > > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list ([email protected]) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/webobjects-dev/bock%40salient.de > > This email sent to [email protected] Mit freundlichem Gruß, René Bock Software Engineering -- salient doremus http://www.salient.de http://www.openforms.de
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
