Re: running code on quitting of a Foundation tool
Re: running code on quitting of a Foundation tool
- Subject: Re: running code on quitting of a Foundation tool
- From: "Michael Ash" <email@hidden>
- Date: Thu, 29 Jun 2006 10:22:32 -0400
On 6/29/06, Donald Hall <email@hidden> wrote:
I must not be looking in the right place. I have a Foundation tool
that I want to do some actions when it receives a 'quit' message. Is
there some way to get a method to run at this time? In AppKit there
is 'applicationWillTerminate'. Is there something similar in
Foundation?( I want to post a notification to the distributed
notification center that the tool is quitting.)
Unless you're running NSApplication in your tool (in which case you
will get applicationWillTerminate:), a Foundation tool does not get a
nice 'quit' message. These tools are generally terminated by sending a
signal to them. It is possible to catch and react to that signal, but
extremely difficult to do in a safe manner. See this page for more
information on the hows and whys:
http://www.cocoadev.com/index.pl?SignalSafety
Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden