Re: Shared User Defaults v. NSUserDefaultsController in a nib question
Re: Shared User Defaults v. NSUserDefaultsController in a nib question
- Subject: Re: Shared User Defaults v. NSUserDefaultsController in a nib question
- From: "Christopher Hickman" <email@hidden>
- Date: Mon, 15 May 2006 16:45:34 -0400
> If you manually add an NSUserDefaultsController to your nib, you can bind
to it,
> the values entered go into the shared user defaults.
>
> If you select the "Shared User Defaults" from the bind to menu, it adds a
"Shared
> User Defaults" icon to your nib. It looks like the
>NSUserDefaultsController, but
> the icon's slightly different.
>
> Binding to either one seems to work identically, so does anyone know why
there are
> two distinct mechanisms in Interface Builder for binding to user
preferences? Is
> there any difference between the two other than how you add them to your
nib?
>
> Thanks!
> Jeff
It appears there is a difference, but I don't know the significance of that
difference. If you drag an NSUserDefaultsController into your nib, then
look at Attributes in the Inspector, you'll be able to un-set "Applies
immediately" and add keys. The Shared User Defaults that is always
available for binding shows "Not applicable" for the Attributes tab (and I
believe it always applies immediately). I'm not sure what adding keys does
for you in this case, and I can't find any other difference. I guess the
reason you'd use this is in case you wanted a pref window that supports an
Apply button.
Topher
_______________________________________________
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