bug-gnustep
[Top][All Lists]
Advanced

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

[bug #22246] problem with key value observation


From: Richard Frith-Macdonald
Subject: [bug #22246] problem with key value observation
Date: Sun, 02 Mar 2008 09:24:31 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-us) AppleWebKit/523.15.1 (KHTML, like Gecko) Version/3.0.4 Safari/523.15

Follow-up Comment #5, bug #22246 (project gnustep):

You know I was having trouble at FOSDEM understanding the complicated
sequence of methods that things were going through in the KVO code ... but
couldn't really tell what I thought was wrong?

Well, I've figured it out ... the takeValue... stuff really shouldn't have
been being used.

The KVC code is set up to call trhe obsolete/deprecated takeValue... methods
from within the setValue... methods if the takeValue... methods have been
overridden and are no longer the default NSObject ones.  The idea is that, if
a programmer has overridden the old methods then they presumably want their
implementations to be used.

The problem arises when the KVO code replaces the standard methods in order
to monitor setting of ivars/properties.  The KVC code sees the overridden
methods and assumes that it should call them.  I've changed the KVC code to
recognise the case where the KVO code has overriden the deprecated methods,
and not call them.

However, while this prevents the multiple calls to notify the observer when
the value is set, it does not avoid the multiple calls to get the value ...
leading me to suspect that our KVO implementation behavior is significantly
different from that of Apple and we need to investigate and bring the
behaviors more in line.



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?22246>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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