Re: Application termination
Re: Application termination
- Subject: Re: Application termination
- From: Marc Weil <email@hidden>
- Date: Mon, 11 Aug 2003 09:32:48 -0400
Also make sure that the class you are implementing
applicationShouldTerminate: is set as the application's delegate. I believe
that the app's delegate is the only object that is sent this message.
- Marc Weil
On 8/11/03 2:40 AM, "j o a r" <email@hidden> wrote:
>
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.
_______________________________________________
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.