Re: Setting a prefs value at quit time
Re: Setting a prefs value at quit time
- Subject: Re: Setting a prefs value at quit time
- From: Quincey Morris <email@hidden>
- Date: Thu, 05 May 2016 17:05:42 -0700
- Feedback-id: 167118m:167118agrif8a:167118scgRWpJi84:SMTPCORP
On May 5, 2016, at 16:38 , Graham Cox <email@hidden> wrote:
>
> If it’s NOT legal to write a prefs value at quit time, how is one supposed to record persistent state that is only final by that time?
Are you using an observer for NSApplicationWillTerminateNotification explicitly, or the applicationWillTerminate delegate method? If yes to either (I assume they’re functionally equivalent), then you should probably use the applicationShouldTerminate delegate method instead, returning NSTerminateNow after saving the user defaults value unless you actually want to delay termination.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden