[Adium-devl] Problems with AIPreferenceController and KVO
Evan Schoenberg
evan.s at dreskin.net
Tue Jan 8 22:09:06 UTC 2008
On Jan 7, 2008, at 10:22 PM, Colin Barrett wrote:
> On Jan 7, 2008, at 5:06 PM, Evan Schoenberg wrote:
>
>> However, it breaks KVO for AIPreferenceController horribly. When a
>> dictionary for a group is removed from the cache, it hasn't
>> changed, and asking the preference controller about it would
>> retrieve the (same) information and return it. However, removing
>> it without calling the willChangeValueForKey: /
>> didChangeValueForKey: leads to errors like:
>
> What about wrappers? The wrapper would do the job of evicting the
> cache or looking up from disk when necessary.
>
> I suppose this depends on wether or not KVO requires that an objects
> address in memory stay the same.
>
This works beautifully, and the code became a TON cleaner in the
process. It feels great to remove all that cruft in
AIPreferenceController and replace it with very simple, object-
oriented calls. Check out http://trac.adiumx.com/changeset/22196 ! :)
-Evan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20080108/40a5868f/attachment-0001.html>
More information about the devel
mailing list