Re: Override Terminate
Re: Override Terminate
- Subject: Re: Override Terminate
- From: Giovanni Donelli <email@hidden>
- Date: Wed, 19 Oct 2005 20:55:23 +0200
There is no reason to override the terminare command.
you can easily use the method posted to the delegate of NSApplication.
An instance of NSApplication referring to your application is NSApp.
so simply call
[NSApp setDelegate:obj];
where obj implements:
- (void)applicationWillTerminate:(NSNotification *)aNotification
An other way is use the NSApplication notification posted upon
termination which is
NSApplicationWillTerminateNotification
here you have to register an observer with NSNotificationCenter
hope it helps,
Giovanni
On 19 Oct 2005, at 8:36 PM, email@hidden wrote:
Hi All,
I am sure this is basic, but I just can't figure it out. What I
want to do is override the terminate command when the use quits my
application. I want to do this so I can release some resources and
perform some clean up.
Thanks in advance!
Kris
_______________________________________________
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
_______________________________________________
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