Application termination
Application termination
- Subject: Application termination
- From: April Gendill <email@hidden>
- Date: Sun, 10 Aug 2003 23:07:09 -0700
Ok... How do I trap the command=q or file->quit so that before the app
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.