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: Jerry Krinock <email@hidden>
- Date: Mon, 11 Jan 2010 10:04:30 -0800
On 2010 Jan 11, at 09:46, Mike Abdullah wrote:
>> I wonder why bindings was not as an extension of KVO, instead of as a separate sideshow. The effect is the same as KVO, with the addition that a designated setter is automatically invoked in the observer when a change is observed.
>
> What makes you say this?
Because when bindings observes a change, it uses KVO *and* invokes a special observer method, as you note ...
> Bindings do work by using KVO. The default implementation calls -setValue:forKey: when it detects a change, but any object is free to handle a binding any way it likes.
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.
_______________________________________________
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