[Adium-devl] Problems with AIPreferenceController and KVO

Augie Fackler lists at durin42.com
Tue Jan 8 03:32:50 UTC 2008


On Jan 7, 2008, at 9: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.

KVO *should* let us add wrappers and behave:
<http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/Compliant.html#//apple_ref/doc/uid/20002172 
 >
(Alternatively, look at the Key-Value Coding Programming Guide:  
Ensuring KVC Compliance)

Augie






More information about the devel mailing list