> On 11 May 2016, at 07:11, Jens Alfke <j...@mooseyard.com> wrote:
> 
> 
>> On May 10, 2016, at 4:05 PM, Carl Hoefs <newsli...@autonomy.caltech.edu> 
>> wrote:
>> 
>> Yes, yes, and yes! I'm using a nil context. I'm not sure how context is to 
>> be used here... Is this an arbitrary value that I check in 
>> -observeValueForKeyPath?
> 
> Yes, but I’m not aware of it being required … what goes wrong if it’s NULL, 
> Quincey?
> 
> —Jens

nothing goes wrong if it’s null, however you can’t tell which observations are 
yours and which belong to one of the other classes in the inheritance chain who 
are also potentially using KVO. 

However lots of people use nil for it and get away with it, but don’t. You will 
one-day handle the KVO notifications for something which isn’t you and starve 
it of doing so. 

Either way - this KVO notification has been passed to the superclass hence the 
exception. I’d doubt it’s because of the context, more likely that he’s 
comparing the notification name string incorrectly and not handling it, or 
handing the KVO and then *still* calling the superclass method. 



_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to