discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

KVO +keyPathsForValuesAffectingValueForKey: not working?


From: Sebastian Reitenbach
Subject: KVO +keyPathsForValuesAffectingValueForKey: not working?
Date: Wed, 02 Oct 2024 19:12:59 +0200
User-agent: SOGoMail 5.11.0

Hi,

I'd like to observer a number of computed @properties in a class. For that 
would like to use +keyPathsForValuesAffectingValueForKey:

Or alternatively using a number of keyPathsForValuesAffectingMyPropertyName 
methods.

as explained here: 
https://developer.apple.com/documentation/objectivec/nsobject/1414299-keypathsforvaluesaffectingvaluef

Whatever I do, the +keyPathsForValuesAffectingValueForKey or 
keyPathsForValuesAffectingMyPropertyName methods never seem to get called by my 
code. 

In gnustep-base/Source/NSKeyValueObserving.m I see an implementation of 
+keyPathsForValuesAffectingValueForKey: but don't see, from where that is ever 
called?

I created a simple test tool demonstrating my issue here: 
https://github.com/buzzdeee/TestObserver

As I understand the docs, this should just work "magically" by the KVO 
implementation, or am I missing something?
Any hints appreciated.

thanks,
Sebastian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]