KVC, binding multiple properties, top level object
KVC, binding multiple properties, top level object
- Subject: KVC, binding multiple properties, top level object
- From: Trygve Inda <email@hidden>
- Date: Sat, 12 Jul 2014 12:05:39 +0000
- Thread-topic: KVC, binding multiple properties, top level object
My object layout looks like:
-MyObject (custom NSObject)
---someProperty (Custom NSObject)
------propertyA (NSNumber)
------propertyB (NSNumber)
------propertyC (NSNumber)
Properties A, B and C use a binding to connect them to a user interface item
with something like:
Bind to MyObject with key path someProperty.propertyA
If I have all three properties hooked up like this, it is easy to change the
value of one of them with [someProperty setPropertyA:newValue] which updates
in a KVC-friendly way and everything is good.
However, I would like to replace the entire someProperty object with a new
object of the same class and have all the lower level bindings see the
change in a KVC way.
Will doing [myObject setSomeProperty:newProperty] issue all the right KVC
notifications so the bound objects update their values?
I just need to update the upper-level object which has lots of bound
properties... Without having to update each property individually.
Thanks,
Trygve
_______________________________________________
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