discuss-gnustep
[Top][All Lists]
Advanced

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

Re: GNUstep and session management


From: Richard Frith-Macdonald
Subject: Re: GNUstep and session management
Date: Thu, 06 Oct 2005 11:19:22 +0000

On 2005-10-06 10:11:53 +0000 Chris Vetter <cbv@gmx.net> wrote:


On Thu, 06 Oct 2005 10:50:22 +0200, Saso wrote:
Quoting Roman Belenov <rbelenov@yandex.ru>:
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.






reply via email to

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