Re: NSKeyValueChangeNewKey returning NSNull, partially solved
Re: NSKeyValueChangeNewKey returning NSNull, partially solved
- Subject: Re: NSKeyValueChangeNewKey returning NSNull, partially solved
- From: Kai BrĂ¼ning <email@hidden>
- Date: Sun, 6 Jan 2008 11:20:09 +0100
>On Dec 24, 2007, at 5:14 AM, Kai BrĂ¼ning wrote:
>
>>>have you considered implementing manual KVO notifications for the setter?
>>
>>I did consider it, but didn't try it (yet) because I *am* getting the changed notification, just with an - in my opinion - incorrect change dictionary.
>>
>>But I at least partially solved the problem in the meantime: the observed class (class of objectToObserve below) was based upon NSController. When I change this to NSObject, everything works.
>>
>>I guess that NSController modifies automatic KVC/KVO in some way. I did not find anything in that direction in the docs so far, but that of course does not mean that it is not documented somewhere. I'll check whether NSController overrides any of the KVC/KVO control methods when I find the time.
>>
>>Nevertheless, a word by somebody in the know would be appreciated.
>
>Kai,
>
>I'm coming to this thread late, so you may already have an answer.
>Though not official Apple documentation, mmalc's Bindings examples page says it's a bug in NSController that the change dictionary always has a nil value.
>
>Goto <http://homepage.mac.com/mmalc/CocoaExamples/controllers.html>, do a text search for "bug".
>
>In my experience, you're informed of the kind of change that occurred (insertion/removal), but the old and new values are always nil.
That is my experience, too.
>
>Bill
Thanks a lot, Bill, this saves me further headaches and investigation. I filed rdar://5672130 requesting to document this behavior.
Kai
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden