• 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: Setting a prefs value at quit time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting a prefs value at quit time


  • Subject: Re: Setting a prefs value at quit time
  • From: Graham Cox <email@hidden>
  • Date: Fri, 06 May 2016 10:14:05 +1000

> On 6 May 2016, at 10:05 AM, Quincey Morris <email@hidden> wrote:
>
> 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,

Yes.

> 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.

I’ll look into that. This is rather old code, so it hasn’t been looked at in some time, and hasn’t been updated for sudden termination, etc.


—Graham



_______________________________________________

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


References: 
 >Setting a prefs value at quit time (From: Graham Cox <email@hidden>)
 >Re: Setting a prefs value at quit time (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Very basic need, very difficult to achieve.
  • Next by Date: Re: Bind NSTableView to array of dictionaries in user defaults
  • Previous by thread: Re: Setting a prefs value at quit time
  • Next by thread: Can't make an adaptive segue push
  • Index(es):
    • Date
    • Thread