On Jan 15, 2010, at 9:59 AM, Keary Suska wrote:

> On Jan 14, 2010, at 9:47 AM, Gerd Knops wrote:
> 
>> I have a typical NSTableView setup where the column content is provided by 
>> an NSArrayController.
>> 
>> Now say a column is bound to arrayController.arrangedObjects key path 
>> a.b.c.d.
>> 
>> In this scenario if "b" changes (even in a KVO-complient way), it will still 
>> result in an NSInternalInconsistencyException 'Cannot remove an observer xxx 
>> for the key path "c.d" from <old instance of "b">, most likely because the 
>> value for the key "c" has changed without an appropriate KVO notification 
>> being sent.'
>> 
>> I understand why this is happening (nothing is observing changes of "b", so 
>> the actual observer is left "dangling").
>> 
>> The question is how can I change my design to avoid this situation?
> 
> The most common reason I have found for this error is that multiple KVO 
> notifications are being sent for the same change. I.e., if you have a 
> willChnage/didChange pair inside or around a KVO compliant setter.

Thank you, that was a most helpful hint. I think that is exactly what is 
happening.

Gerd

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to