• 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
Cocoa bindings with NSUserDefaultsController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cocoa bindings with NSUserDefaultsController


  • Subject: Cocoa bindings with NSUserDefaultsController
  • From: David Hoerl <email@hidden>
  • Date: Tue, 11 Jul 2006 13:11:08 -0400

In
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/NSUserDefaultsController.html

Apple tells us to programmatically set values thusly:

[[theDefaultsController values] setValue:newUserName forKey:@"userName"];

That is, to get the "values" object, then to set its value.


However, when you do bindings in IB to a NSUserDefaultsController, it would imply that the binding is done as:


[theDefaultsController setValue:newUserName forKey:@"values.userName"];


Trying the above, it fails with an error:

[<NSUserDefaultsController 0x3e6800> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key values.userName


Just trying to understand why I can get an object, then set a value, but I cannot set the value by messaging the controller directly.


David
_______________________________________________
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


  • Follow-Ups:
    • Re: Cocoa bindings with NSUserDefaultsController
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: nil pointers
  • Next by Date: NSBox frame redraw issue
  • Previous by thread: [ANN] JigSaw Plugin Development kit available
  • Next by thread: Re: Cocoa bindings with NSUserDefaultsController
  • Index(es):
    • Date
    • Thread