• 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 Response for incomplete paths
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: KVO Response for incomplete paths


  • Subject: Re: KVO Response for incomplete paths
  • From: Ken Thomases <email@hidden>
  • Date: Wed, 21 May 2008 15:57:20 -0500

On May 21, 2008, at 2:55 PM, Mike Abdullah wrote:

On 21 May 2008, at 19:51, Gordon Apple wrote:

Not having access to the innards of KVO, I wonder how dymanic the
process is. For example, my inspector bindings are through an object
controller which binds through MSApp.mainWindow which seems to successfully
switch its focus to a new main window with no problems. This, to me,
indicates that the process operates dynamically according to the path,
rather than statically binding when it is set up.

Correct, except it's not looking up every element along the key path every time it needs to access it. It only needs to update itself when one of the objects along the key path reports that the relevant property has been changed.



So my new question is whether or not I can successfully observe a
property that does not exist at registration time, and then have it observe
properly when the path is created. E.g., register to observe
xxx.shadow.angle when shadow does not exist, then add the shadow object and
have xxx.shadow.angle be observed properly.

As long as xxx returns nil for -valueForKey:@"shadow" initially, and then puts out proper KVO notifications when a shadow comes into being, this works just fine.

Search the Foundation Release Notes <http://developer.apple.com/releasenotes/Cocoa/Foundation.html#KVCKVO > for "Bug Fix in KVO's Dependency Mechanism" for a caveat to this pre-Leopard. Understanding the exact meaning of that caveat is something else entirely. ;P


Cheers,
Ken
_______________________________________________

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


References: 
 >Re: KVO Response for incomplete paths (From: Gordon Apple <email@hidden>)
 >Re: KVO Response for incomplete paths (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: Trying to understand -- please help...
  • Next by Date: Re: Programmatically get treecontroller selection
  • Previous by thread: Re: KVO Response for incomplete paths
  • Next by thread: Re: KVO Response for incomplete paths
  • Index(es):
    • Date
    • Thread