• 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 Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSUserDefaultsController Problem


  • Subject: Re: NSUserDefaultsController Problem
  • From: mmalcolm crawford <email@hidden>
  • Date: Tue, 1 Nov 2005 07:29:23 -0800


On Oct 31, 2005, at 11:26 PM, Marc Blatt wrote:

Each controller on the Preferences Panel is KVC bound to the Shared User Defaults (NSUserDefaultsController) and additional Target/ Action connections fire methods that send notifications to registered observers. Upon relaunch of the app, the Preferences Panel retains its last settings.

Why are you using target-action/notifications rather than simply observing the NSUserDefaultsController or registering for user defaults change notifications?


In my CoreDataAppDelegate, I register the defaultValues in NSUserDefaults for the user's preferences and the same data is registered as initialValues for the NSUserDefaultsController.

Again, why do both rather than just using the NSUserDefaultsController?

See <http://developer.apple.com/documentation/Cocoa/Conceptual/ CocoaBindings/Concepts/NSUserDefaultsController.html>.

mmalc

_______________________________________________
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


  • Prev by Date: Re: private frameworks
  • Next by Date: [Moderator] Cocoa and list resources
  • Previous by thread: PMSET - Tiger vs Panther problem (functionality cat fight)
  • Next by thread: [Moderator] Cocoa and list resources
  • Index(es):
    • Date
    • Thread