• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Application termination
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Application termination
      • From: Marc Weil <email@hidden>
References: 
 >Application termination (From: April Gendill <email@hidden>)

  • Prev by Date: Re: Setting focus to text field in drawer
  • Next by Date: Re: Accessing System Preferences?
  • Previous by thread: Application termination
  • Next by thread: Re: Application termination
  • Index(es):
    • Date
    • Thread