On Wednesday, October 02, 2024 21:04 CEST, Frederik Seiffert <[email protected]> wrote:
> This is currently not supported in GNUstep, but there’s an open pull request > that implements this and various other improvements for KVO: > https://github.com/gnustep/libs-base/pull/420 > awesome, I was already struggling two days to get it to work ;) I'll give it a try and follow up there thanks for the pointer, Sebastian > Frederik > > > > Am 02.10.2024 um 15:42 schrieb Sebastian Reitenbach > > <[email protected]>: > > 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
