Re: Setting a prefs value at quit time

2016-05-05 Thread Graham Cox
> On 6 May 2016, at 10:05 AM, Quincey Morris > wrote: > > On May 5, 2016, at 16:38 , Graham Cox 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 NSApplicat

Re: Setting a prefs value at quit time

2016-05-05 Thread Quincey Morris
On May 5, 2016, at 16:38 , Graham Cox 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 applicationWillTermi

Re: Setting a prefs value at quit time

2016-05-05 Thread Alex Zavatone
Isn’t there a sudden termination option to allow this for this exact purpose? Or would there be an application delegate method that would allow the application to quit? When a quit is issued, make sure that the can quit returns NO and after the prefs are written, change that value to YES and