Re: NSUserDefaultsController and Shared Defaults
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