Re: KVO dependent keys

Christiaan Hofman <[email protected]> Wed, 15 Jun 2011 15:04:55 +0200
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
On Jun 15, 2011, at 14:53, Christiaan Hofman wrote:

> According to the documentations there are now two ways to declare dependent keys for KVO (apart from deprecated ways): override +keysForValuesAffectingValueForKey:, or implement a method +keysForValuesAffecting<Key>. Is this true?
> 
> My problem here is that when I do the former, the KVO dependency does not work, but when I do the latter it does work. So is this an implementation bug or a documentation bug, or am I misreading the documentation?
> 
> BTW I want to override the general method because I have a lot of keys that have the same dependencies, so it seems more natural to override one method rather than implementing a large number of specific methods.
> 
> Christiaan

Small correction, of course I meant +keyPathsForValuesAffectingValueForKey: and keyPathsForValuesAffecting<Key>. That does not change the question.

Christiaan