• 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: Shared User Defaults v. NSUserDefaultsController in a nib question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: ScreenSaver and NSUserDefaultsController
  • Next by Date: The application that you built
  • Previous by thread: Re: ScreenSaver and NSUserDefaultsController
  • Next by thread: The application that you built
  • Index(es):
    • Date
    • Thread