• 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: WOSession.SessionDidTimeOutNotification oddity (was: app closing method)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOSession.SessionDidTimeOutNotification oddity (was: app closing method)


  • Subject: Re: WOSession.SessionDidTimeOutNotification oddity (was: app closing method)
  • From: René Bock <email@hidden>
  • Date: Tue, 05 Aug 2014 17:05:56 +0200


Am 05.08.2014 um 16:54 schrieb Klaus Berkling <email@hidden>:


On Aug 5, 2014, at 1:04 AM, René Bock <email@hidden> 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





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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >WOSession.SessionDidTimeOutNotification oddity (was: app closing method) (From: René Bock <email@hidden>)

  • Prev by Date: Re: D2W app date field is required ???
  • Next by Date: Yosemite
  • Previous by thread: WOSession.SessionDidTimeOutNotification oddity (was: app closing method)
  • Next by thread: Re: D2W app date field is required ???
  • Index(es):
    • Date
    • Thread