Re: Why aren't my bindings firing?
Re: Why aren't my bindings firing?
- Subject: Re: Why aren't my bindings firing?
- From: Scott Anguish <email@hidden>
- Date: Wed, 2 Jul 2008 20:13:35 -0400
On Jul 2, 2008, at 7:04 PM, Hamish Allan wrote:
On Wed, Jul 2, 2008 at 5:31 PM, Scott Anguish <email@hidden>
wrote:
Key value Binding and Cocoa Bindings are the same thing.
Key-Value Binding is implemented at the foundation level. Cocoa
Bindings is
the name used for the additional features (controllers, views that
support
bindings, etc..) which is implemented at the AppKit level.
So there is no distinction.
This is a rather unuseful attitude to take. Clearly, this thread
started as a result of the distinction.
It may have started from that, but there is no distinction. they are
the same technology. KVB is the protocol, Cocoa Bindings is the term
used to describe the complete set of features, including the
controller and view objects.
Also, Apple's own
documentation disagrees with you, as it states that Cocoa bindings are
built on KVB.
It was never intended to even hint that they were separate things.
They are one and the same.
<excerpt>
The NSKeyValueBindingCreation informal protocol provides methods to
create and remove bindings between view objects and controllers or
controllers and model objects. In addition, it provides a means for a
view subclass to advertise the bindings that it exposes. This informal
protocol is implemented by NSObject and its methods can be overridden
by view and controller subclasses.
</excerpt>
Binding directly between objects other than those was at the time that
was written (and IMHO should still be) discouraged. There is still
difference of opinion on whether that should be the case.
Ken's synopsis is right on the mark. I'd go even further
and say that two-way binding ought to use a separate selector to make
the distinction clear. There is already *far too much* hidden magic in
bindings.
Furthermore, bind:toObject:withKeyPath:options: is implemented in a
category of NSObject in AppKit.framework, not at the Foundation level.
I agree with you that it should be in the latter, though!
Yes, I screwed this up and immediately realized it when I was away
from the machine.
_______________________________________________
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