Updating bound controls with selection change
Updating bound controls with selection change
- Subject: Updating bound controls with selection change
- From: Ari Benzane <email@hidden>
- Date: Wed, 22 Aug 2007 13:41:04 +0100 (BST)
I have a bindings/KVO question that's driving me nuts. I have an inspector panel with a host of controls bound to the values of the currently 'selected' object in the document. Only one object can be selected at a time. When the selection changes, I want the bound controls to reflect the new selection, but they don't get notified because I'm not calling the KVO accessors. Currently I've got code like this that's called when the selection changes:
[SelectedObject setValueA: [SelectedObject valueA]];
[SelectedObject setValueB: [SelectedObject valueB]];
This updates the controls in a round-about way but it's a mess. Is they're an easier way? I've read Apple's Bindings and KVO docs but they only cover the simple cases.
Thanks for any help - sorry if this strikes you as a noob question!
---------------------------------
For ideas on reducing your carbon footprint visit Yahoo! For Good this month.
_______________________________________________
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