• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bindings and KVO of View objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bindings and KVO of View objects


  • Subject: Re: Bindings and KVO of View objects
  • From: Stuart Malin <email@hidden>
  • Date: Tue, 19 May 2009 14:17:24 -1000


On May 19, 2009, at 1:44 PM, Kyle Sluder wrote:

On Tue, May 19, 2009 at 7:01 PM, Quincey Morris
<email@hidden> wrote:
On May 19, 2009, at 14:18, Stuart Malin wrote:
No. The name of the binding is *not* the same as the name of any property of
the bound object. For example, most controls have a "value" binding, but
controls don't have a "value" property.

Actually, be careful if you're implementing a bindable object. I believe the default implementation of -bind:toObject:withKeyPath:options: actually uses the provided key as a property, even though this isn't documented anywhere.

I realized after I issued my post that I had inverted the thinking regarding KVO . For bindings, the KVO is used to observe the property that is *given* to the binding in the - bind:toObject:withKeyPath:options: method call.


The assumption underlying your assumption, that there is some sort of direct
correlation between a binding and an underlying property, is also false.
Typically, bindings will be implemented so as to use one or more properties
of the bound object, but that's not a requirement (except perhaps in a
looser conceptual sense).

This point needs to be made more clearly: binding names and properties live in separate namespaces.


Yes: there is no correlation between a named binding and any underlying property.


_______________________________________________

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


  • Prev by Date: Re: Synthesized properties for scalars not KVO compliant
  • Next by Date: Re: Bindings and KVO of View objects
  • Previous by thread: Re: Bindings and KVO of View objects
  • Next by thread: Re: Bindings and KVO of View objects
  • Index(es):
    • Date
    • Thread