key path blues
key path blues
- Subject: key path blues
- From: Dave Sopchak <email@hidden>
- Date: Thu, 1 Feb 2007 10:55:38 -0800
Hi all,
I love KVO until I start using key paths...
I have a top level object, KVC compliant, which is hooked to an
NSObjectController in IB. I have some text fields set to the object's
values. Everything works fine, I can receive changes made to the text
fields and also set the text fields' value by invoking accessor
methods from the top object.
I have a KVC compliant object in this top level object and have set
key paths in other text fields to values in this object. I can
receive changes from the text fields, but changing its values with
accessor methods, either from the object itself, or from the top
object, doesn't register a change.
Examples:
[self setTempSetpoint:135]; // this sets the bound text fields value
and sets the value in the object
[[self polCurve] setDwell:3.9]; // this doesn't, but it sets the
value in the object
[self setValue:[NSNumber numberWithFloat:3.14]
forKeyPath:@"polCurve.dwell"]; // this has the same effect as the
previous command
any help, much appreciated.
Dave
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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