On 2005-10-06 10:11:53 +0000 Chris Vetter <[EMAIL PROTECTED]> wrote:
On Thu, 06 Oct 2005 10:50:22 +0200, Saso wrote:
Quoting Roman Belenov <[EMAIL PROTECTED]>:
Is there a fallback for applications that don't explicitly observe this
notification (like passing terminate: to NSApplication instance) ? What
about OpenStep or Mac OS X - do they have something like that ?
In theory, when the workspace (or session manager) sends
NSWorkspaceWillPowerOffNotification, every running application (and thus
also it's app delegate object) is sent -applicationSholdTerminate to find
out whether to proceed. However, I haven't used it on GNUstep yet, so no
clue as to how reliable this is.
I actually played around with NSWorkspaceWillPowerOffNotification last night
by posting this notification in one application, explicitly listening for it
in another and a third without a listener.
Neither of the three applications got a -applicationShouldTerminate:
The -applicationShouldTerminate: message is supposed to be sent to the
application's delegate by the -terminate method.
My reading of it is that it's your responsibility as a developer to have
your code listen for the notification and call [NSApp -terminate] when you
receive it. I don't think the gui/AppKit does that for you. Did you try
this on MacOS-X? It would be interesting to know how it actually behaves.
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep