discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUstep and session management


From: Adrian Robert
Subject: Re: GNUstep and session management
Date: Fri, 07 Oct 2005 16:58:13 -0400


On Oct 7, 2005, at 3:50 PM, Sašo Kiselkov wrote:

Let's just stop putting up theories about how it may or may not work on OSX and
instead start designing a way that would work for us.

I think we should try to follow OS X behavior to make things easier for people porting or maintaining cross-platform apps unless there's something broken in the way OS X does it. Questions can be settled easily by running some test code on an OS X box. I don't have time to write a test class right now but if someone sends me one I can compile it and try it out on Panther and Tiger and post the results here.

One thing I can verify for sure is that even without any explicit registration for notifications or delegate implementation, - terminate: gets called on the NSApp (with a nil sender) when a logout occurs. Presumably -applicationShouldTerminate: is called on the delegate before that, at which point the app can veto it by returning NO (and on OS X this stops the logout). 10.4's Xcode docs show:

- (NSApplicationTerminateReply)applicationShouldTerminate: (NSApplication *)sender

Invoked from within the terminate: method immediately before the application terminates. sender is the NSApplication to be terminated. The value returned should be one of the values defined in “Constants”. For compatibility reasons, a return value of NO is equivalent to NSTerminateCancel, and a return value of YES is equivalent to NSTerminateNow. (See Also: – terminate:, – applicationShouldTerminateAfterLastWindowClosed:, – applicationWillTerminate:)



I suspect this is what the desktop logout action is sending.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]