• 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
Userdefaults, their initial values, and bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Userdefaults, their initial values, and bindings


  • Subject: Userdefaults, their initial values, and bindings
  • From: Francis Derive <email@hidden>
  • Date: Mon, 20 Aug 2007 16:51:15 +0200

Hello world,

I used bindings to bind, in IB, colorWells values of a preferences panel to a shared instance of NSUserDefaultsController.
Well made without doing much.


What about initial values of these defaults ?

From "User Defaults and Bindings"docs @ ADC Home > Reference Library > Guides > Cocoa > Design Guidelines > Cocoa Bindings Programming Topics >, the code of Listing 2 Changing the initial values of the sharedUserDefaultsController instance shows :

// load the default values for the user defaults

userDefaultsValuesPath=[[NSBundle mainBundle] pathForResource:@"UserDefaults"

                               ofType:@"plist"];

but this gives null for my app.

If something of my defaults are stored on disk, it is at ~/Library/ Preferences/com.myApp.plist.

Why this difference ? no "UserDefaults" resource in my app bundle - is it because, using bindings for userdefaults, I didn't registerDefaults: ?

What can I do as it is ?

Francis




_______________________________________________

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


  • Follow-Ups:
    • Re: Userdefaults, their initial values, and bindings
      • From: mmalc crawford <email@hidden>
  • Prev by Date: Re: Is this a bug of InterfaceBuilder?
  • Next by Date: Re: Userdefaults, their initial values, and bindings
  • Previous by thread: Core Data didTurnIntoFault:
  • Next by thread: Re: Userdefaults, their initial values, and bindings
  • Index(es):
    • Date
    • Thread