On Fri, 29 Jan 2010 22:52:34 -0800, Jerry Krinock <[email protected]> said: >[this1] >This clearly states, twice, that ind:toObject:withKeyPath:options: creates something which is bidirectional. >[this2] >This tells me that, "as a minimum", a binding is only unidirectional. > >How do you know when a binding is going to be unidirectional or bidirectional
There's a common misconception here, and I see a lot of nonsense written about it, to which I with difficulty restrain myself from responding. It's all very simple. (1) There is no such thing as a bidirectional binding; all bindings are unidirectional. If you want a bidirectional binding, set up two bindings so that you bind in both directions (there is nothing wrong with this, the computer doesn't explode or anything like that). (2) But some objects, most notably built-in interface objects, when they are told to bind, also set up KVO so that information runs back the other way. You can emulate this in your own interface objects, and mmalc has a wonderful example that shows you how to do it (and, by implication, shows you how the built-in interface objects are doing it). m. -- matt neuburg, phd = [email protected], <http://www.tidbits.com/matt/> A fool + a tool + an autorelease pool = cool! AppleScript: the Definitive Guide - Second Edition! http://www.tidbits.com/matt/default.html#applescriptthings _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
