Re: "Bindings"; Was: whether property in Cocoa class is KVO-compliant?
Re: "Bindings"; Was: whether property in Cocoa class is KVO-compliant?
- Subject: Re: "Bindings"; Was: whether property in Cocoa class is KVO-compliant?
- From: Quincey Morris <email@hidden>
- Date: Mon, 11 Jan 2010 12:03:09 -0800
On Jan 11, 2010, at 10:04, Jerry Krinock wrote:
> Well, I guess I'm talking about the default implementation then. I just mean I'd probably have an easier time learning bindings if they were called maybe "KVO Plus", and somehow used a class' regular properties on both ends of a binding, instead of defining this separate "bindings" namespace with definitions that often duplicate the regular properties.
My *guess* is that bindings were originally intended to use properties on both ends (note that the -[NSObject bind: ...] documentation *still* says this), but developed from there so that one end was something more general with its own namespace. To me, the Cocoa Bindings Reference document reads as if it were written under this incorrect assumption, and then not-quite-thoroughly corrected later. That's one piece of documentational obscurity.
Binding *are* bi-directional, in the general sense that they're supposed to allow a property value to be modified from either end of the binding. However, the individual frameworks technology pieces from which bindings are constructed are all uni-directional. That's another piece of documentational obscurity.
I only recently figured out that Cocoa binding != binding: although all Cocoa bindings are bindings, not all bindings are Cocoa bindings. That's a third piece of documentational obscurity -- although the fact that it took me 2 years to figure it out possibly reflects badly on me rather than the documentation.
I now believe that Cocoa bindings are distinguished by (amongst other things) special (meaning, going beyond KVC) handling for key paths involving NSController objects, although this is undocumented apart from the occasional hint. More documentational obscurity.
_______________________________________________
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