Subclassing NSUserDefaultsController
Subclassing NSUserDefaultsController
- Subject: Subclassing NSUserDefaultsController
- From: Thomas Bauer <email@hidden>
- Date: Sun, 20 Sep 2009 21:39:54 +1200
Dear List,
In some cases my application needs to modify and get the user defaults
from a different user than the one it is launched under.
Since this affects not only things done programmatically, but also
parts of the user interface that use bindings,
I was thinking an elegant solution would be to make the SharedDefaults
controller be a subclass and
override the designated init method to either be initialized by
sharedDefaults or a NSDefaults object created with initWithUser.
Unfortunately this does not seem to work on a basic level.
Even though I have assigned a custom NSUserDefaultsController subclass
to the Shared Defaults object in interface builder,
the designated initializer
- (id)initWithDefaults:(NSUserDefaults *)defaults initialValues:
(NSDictionary *)initialValues
is never called.
Any suggestions on why that is or if there is another maybe better way
to accomplish operating on a different users defaults domain would be
appreciated.
Thanks and regards
Thomas
_______________________________________________
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