Re: Application termination
Re: Application termination
- Subject: Re: Application termination
- From: j o a r <email@hidden>
- Date: Mon, 11 Aug 2003 08:40:22 +0200
Read up on the "synchronize" method of NSUserDefaults.
If you're not using NSUserDefaults to store your preferences (you
should), then you might do something investigate using
"NSTerminateLater" and "replyToApplicationShouldTerminate:", that can
be found in the docs for NSApplication (and probably the list
archives).
j o a r
On den 11 augusti 2003, at 08:07:09AM, April Gendill wrote:
will terminate it will update the applicat6ions preferences with
information?
I kinda thought this would do it, but its does not.
Ok... to be honest I did not think for an instant that I could figure
this out.
But anyway, how would I go about trapping the terminate long enough to
write some data and then let the app quit?
-
(NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication
*)sender
{
if([self performSelector:@selector(writeData:)]){
return NSTerminateNow;
}
return NSTerminateCancel;
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.