• 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: basic bindings question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: basic bindings question


  • Subject: Re: basic bindings question
  • From: Daniel Child <email@hidden>
  • Date: Thu, 15 May 2008 22:47:01 -0400

You were right, it accidentally switched to user defaults. Removing that and setting it back to controller still leads to a runtime exception.

2008-05-15 22:30:53.718 StringBinding[290:10b] An uncaught exception was raised
2008-05-15 22:30:53.719 StringBinding[290:10b] [<NSApplication 0x119650> valueForUndefinedKey:]: this class is not key value coding- compliant for the key values.
2008-05-15 22:30:53.723 StringBinding[290:10b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<NSApplication 0x119650> valueForUndefinedKey:]: this class is not key value coding-compliant for the key values.'
2008-05-15 22:30:53.723 StringBinding[290:10b] Stack: (
2449281611,
2445869307,
2449280369,


Under bindings, "Values" shows that it is set to Controller.number. I have set up conventional accessors. Under setNumber: I also try to bounce the value back to an outlet text field using

[valueField setStringValue: [self number] stringValue];

But it doesn't even run. I am not clear why it is claiming NSApp is not key value coding-compliant when I set up the binding to the controller object.

On May 15, 2008, at 12:54 AM, Ken Thomases wrote:

This seems to have nothing to do with the above code. First, the key involved is called "values" not "number". Second, the receiver is the NSApplication instance. So, why is something trying to access a non-existent "values" property of the NSApplication class?

NSUserDefaultsController has a "values" property. I wonder if you temporarily had a binding to that which you attempted to redirect toward File's Owner but you didn't change it properly.

_______________________________________________

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: basic bindings question
      • From: Ken Thomases <email@hidden>
References: 
 >basic bindings question (From: Daniel Child <email@hidden>)
 >Re: basic bindings question (From: Ken Thomases <email@hidden>)
 >Re: basic bindings question (From: Daniel Child <email@hidden>)
 >Re: basic bindings question (From: Ken Thomases <email@hidden>)
 >Re: basic bindings question (From: Daniel Child <email@hidden>)
 >Re: basic bindings question (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: setting target and action for a NSSlider programmatically in a class that is not "file's owner" - how?
  • Next by Date: Re: setting target and action for a NSSlider programmatically in a class that is not "file's owner" - how?
  • Previous by thread: Re: basic bindings question
  • Next by thread: Re: basic bindings question
  • Index(es):
    • Date
    • Thread