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: Fred Kiefer
Subject: Re: Key Value Observation is over reacting
Date: Fri, 14 Dec 2007 20:25:16 +0100
User-agent: Thunderbird 2.0.0.6 (X11/20070801)

Richard Frith-Macdonald wrote:
> 
> I have to leave soon (I'm away for the weeked to go to a christmas
> party), so I've comitted the work I've done to svn.  I don't expect
> anyone else will be using it so if I've broken KVO that should not cause
> problems (I did make sure my changes compiled).
> 
> Basically the idea was a rewrite so that we only override setters at the
> point when we first add an observer for the corresponding key.  I hope
> it works, but haven't had any time to test it at all (and I'd also like
> to clean it up a bit and make sure it raises the same exceptions that
> apple raises when there are errors).
> 
> Anyway, if you can play with it and either fix any problems or email me
> about them (and I'll try to deal with any issues on monday), I'd be
> grateful.  Otherwise, just use the earlier version from svn.  Enjoy.
> 

As far as I was able to test your new implementation works. Great job!

The bad thing is that I am already stuck again. My code uses setKeys:
triggerChangeNotificationsForDependentKey: and here the dependent key is
one that doesn't even exists on the observed object. What the code needs
to do to handle this is to add the setter override for all the keys that
get mapped to the dependent key. I have a look if I am able to implement
that on top of your new code. At a first glance it doesn't look to hard.

Fred




reply via email to

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