• 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: rewriting observed keyPath
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rewriting observed keyPath


  • Subject: Re: rewriting observed keyPath
  • From: Remco Poelstra <email@hidden>
  • Date: Wed, 16 Feb 2011 09:19:33 +0100

Op 15 feb 2011, om 23:59 heeft Quincey Morris het volgende geschreven:

> On Feb 15, 2011, at 11:27, Kyle Sluder wrote:
>
>> As long as -current and -preset0 return the same object, and that
>> object is KVO-compliant for @"parameters", then observing
>> @"current.parameters" and @"preset0.parameters" are equivalent.
>
> Kyle beat me to the punch on this part of the answer, but there's one additional point -- the preferences controller *also* needs to be KVO compliant with "current", otherwise changing "current" will leave observers of "current.parameters" out of date. The OP's originally posted attempt at an implementation of the "current" property wasn't KVO compliant, but the version I suggested was.
>

Thanks for the insights. It works fine now.
Leaves me wondering how that KVO registering works, how does the runtime now that it's the same path that is monitored? Especially in the situation where the full keyPath might not yet exist. You can still register for it and be notified as soon as it's created.

Regards,

Remco Poelstra

_______________________________________________

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

  • Follow-Ups:
    • Re: rewriting observed keyPath
      • From: Quincey Morris <email@hidden>
References: 
 >rewriting observed keyPath (From: Remco Poelstra <email@hidden>)
 >Re: rewriting observed keyPath (From: Quincey Morris <email@hidden>)
 >Re: rewriting observed keyPath (From: Remco Poelstra <email@hidden>)
 >Re: rewriting observed keyPath (From: Kyle Sluder <email@hidden>)
 >Re: rewriting observed keyPath (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Processing mouse clicks using Quartz events
  • Next by Date: Re: Key equivalents for non-menu items
  • Previous by thread: Re: rewriting observed keyPath
  • Next by thread: Re: rewriting observed keyPath
  • Index(es):
    • Date
    • Thread