Re: NSUserDefaultsController and Shared Defaults
Re: NSUserDefaultsController and Shared Defaults
- Subject: Re: NSUserDefaultsController and Shared Defaults
- From: kelvSYC <email@hidden>
- Date: Wed, 01 Jun 2005 22:21:37 -0600
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.
So in essence what I do in one window will not affect what is set in
the other window (ie. only the prefs set by window A are reverted
back to default when the "revert to default" button in window A is
pressed, even if some prefs in window B are not at their default)?
If not, how do I make it so?
_______________________________________________
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