gnustep-dev
[Top][All Lists]
Advanced

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

Re: Key Value Observation is over reacting


From: Markus Hitter
Subject: Re: Key Value Observation is over reacting
Date: Fri, 14 Dec 2007 02:11:02 +0100


Am 13.12.2007 um 21:12 schrieb Fred Kiefer:

 I just see that this special case is not
failing there. Should I set breakpoints on methods of the watched
instance and check the back trace for on the fly methods?

Yes, why not?

As for the remaining part, I can't see when the getter method would be used inside KVO at all. Notifications are sent on value changes only, which does the setter. Where does the conflict arise?

Until today, I always thought KVO is based on a mini notification center inside NSObject's -setValue:forKey:. This method would try a few ways to get the variable set, then send a notification to all subscribers on success. No need to patch existing classes.

However, this morning I learned, Apple uses something they call "isa- swizzling":

<http://developer.apple.com/documentation/Cocoa/Conceptual/ KeyValueObserving/Concepts/KVOImplementation.html#//apple_ref/doc/uid/ 20002307>


Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/








reply via email to

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