• 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: KVO and relationships
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: KVO and relationships


  • Subject: Re: KVO and relationships
  • From: Scott Stevenson <email@hidden>
  • Date: Wed, 22 Nov 2006 02:05:44 -0800


On Nov 21, 2006, at 4:41 AM, David Aames wrote:

So I'm trying to get a deeper understanding of how KVO plays along with bindings... so when I issue:

[textfield bind:@"value" toObject:controller withKeypath:@"selection.name" options:nil];

Or the [....] the textfield will actually start observing the "name" property of the "selection" object (the object returned by [controller valueForKey:@"selection"])?

I guess there's no way to know for sure without looking at the source for the class. The behavior isn't enforced at the language level, so each class is free to implement the KVB and KVO methods in any way which makes sense.


Theoretically, it would be a nicer abstraction if the text field didn't try to circumvent the controller. In any case, it's an implementation detail which you probably shouldn't rely on.

   - Scott

_______________________________________________

Cocoa-dev mailing list      (email@hidden)

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


  • Follow-Ups:
    • Re: KVO and relationships
      • From: David Aames <email@hidden>
References: 
 >KVO and relationships (From: "David Aames" <email@hidden>)
 >Re: KVO and relationships (From: Scott Stevenson <email@hidden>)
 >Re: KVO and relationships (From: "David Aames" <email@hidden>)

  • Prev by Date: Can't get my application to see my Help Folder
  • Next by Date: Re: NSTableView and NSView
  • Previous by thread: Re: KVO and relationships
  • Next by thread: Re: KVO and relationships
  • Index(es):
    • Date
    • Thread