On 2005-10-06 10:36:47 +0000 Chris Vetter <[EMAIL PROTECTED]> wrote:
On Thu, 06 Oct 2005 08:58:44 +0000, Richard wrote:
On 2005-10-06 07:53:48 +0000 Roman Belenov <[EMAIL PROTECTED]> wrote:
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 ?
Not that I know of ... observing the notification seems to be the
'graceful' way to shut down.
Internally, an application receiving a power-off notification would
usually call its own -terminate method to shut down, but you can't
generally call that from outside the application. So if an application
ignores the power off notification, I guess you really have to use the
kill() system call to stop it in a less graceful manner.
What about using -launchedApplications in NSWorkspace, then step through
each item of the array and send an explicit -terminate: to it?
If we modified the code so that the applications would respond to a
-terminate message (or some other termination message) from the workspace
manager that would work. Messages sent to an application (except for
services messages) currently go to the delegate of the NSApplication
instance rather than to the NSApplication instance itsself. That was a
security measure to stop arbitrary processes connecting to your applications
and taking control of them.
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep