Re: Double binding not possible?
Re: Double binding not possible?
- Subject: Re: Double binding not possible?
- From: vincent habchi <email@hidden>
- Date: Fri, 11 Jun 2010 17:14:13 +0200
Ken,
> Yes, it is impossible.
That's what I thought.
> Those bindings are two-way. (Not all are, but those are.) Thus, when the bound-to property changes, so does the view's selection. Now, how would this work if the view's selection were bound to two different properties? What if those properties were inconsistent with each other?
>
> Out of curiosity, which two objects were you binding to? That may suggest a design problem. Or do you mean two properties of the same object? Usually, a view binding is bound to a property of a controller.
Roughly, I have two objects: one is a NSDictionaryController whose keys (NSStrings) are bound to the "Content Values" of the popUpButton. The "Selected Value" is bound to some attribute of a result object that collects the values chosen by the user (the PopUp button is part of a larger dialog). At the same time, I'd obviously like the "Selected Index" binding of the NSPopUp to be bound to the selectedIndex property of the NSDictionaryController, but that where it fails.
The easiest solution is to implement an IBAction, that's what I am doing currently.
Thanks a lot,
Vincent_______________________________________________
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