• 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: NSUserDefaultsController and Shared Defaults
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSUserDefaultsController and Shared Defaults


  • Subject: Re: NSUserDefaultsController and Shared Defaults
  • From: Julian <email@hidden>
  • Date: Wed, 1 Jun 2005 23:59:40 -0400



On Jun 1, 2005, at 11:27 PM, kelvSYC wrote:

I have an app with prefs that are set in two windows. Each window's set of prefs has default values, but both windows bind their prefs through the shared defaults controller. Each window also has a separate "revert to default" button.

Am I correct in believing that if I press the "revert to default" button in one window it will revert _both_ sets of prefs? If so, would giving each window its own NSUserDefaultsController fix this?

No, the when you setInitialValues with a dictionary of default values with the NSUserDefaultsController it uses an application domain aka com.apple.mail, so in essence an application can only use _one_ set of defaults to revert to, if you overwrite this by calling the setInitialValues... it overwrites the previous in the user domain space.


~J

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: NSUserDefaultsController and Shared Defaults
      • From: kelvSYC <email@hidden>
References: 
 >NSUserDefaultsController and Shared Defaults (From: kelvSYC <email@hidden>)

  • Prev by Date: NSUserDefaultsController and Shared Defaults
  • Next by Date: Bindings & NSTableView: setting cell as 'editable' based on another property
  • Previous by thread: NSUserDefaultsController and Shared Defaults
  • Next by thread: Re: NSUserDefaultsController and Shared Defaults
  • Index(es):
    • Date
    • Thread