• 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
NSUserDefaults and valueForKeyPath ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSUserDefaults and valueForKeyPath ?


  • Subject: NSUserDefaults and valueForKeyPath ?
  • From: "Arthur C." <email@hidden>
  • Date: Tue, 9 Dec 2008 23:38:41 +0100 (CET)

I've been busy adding some structure to the NSUserDefaults in my app. So I
would have a dictionary like 'generalPrefs' with some key/value pairs,
separate from 'otherPrefs' etc.

Now I wonder why the following doesn't work:

[[NSUserDefaultsController sharedUserDefaultsController] valueForKeyPath:
@"values.generalPrefs.numberOfPoints"]

while this does work:

[[NSUserDefaultsController sharedUserDefaultsController] valueForKeyPath:
@"values.generalPrefs"],

after which generalPrefs can be referenced.

Am I missing some elementary KVC or is there something special about the
user defaults?


Thanks for your time,
Arthur

_______________________________________________

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

  • Prev by Date: Correction: Cocoaheads Lake Forest (92630) meeting 12/10/2008 at 7 pm on "Adding Unit Tests to a Cocoa Application"
  • Next by Date: Re: How Can I Notify DrawRect Method?
  • Previous by thread: Correction: Cocoaheads Lake Forest (92630) meeting 12/10/2008 at 7 pm on "Adding Unit Tests to a Cocoa Application"
  • Next by thread: How to detect a paste request for file copy/paste?
  • Index(es):
    • Date
    • Thread