Hello,

I'm puzzled by a problem that I am seeing with key value observing an 
arraycontroller and I'm hoping that someone here could shed some light. Here's 
the situation:

I have a nib with a panel that contains a collectionview and an 
arraycontroller. It's like some Tool panel in a drawing app. The 
arraycontroller content binding is bound to a method in the windowcontroller 
(file's owner) that returns an array of custom objects. The collectionview 
content and selectionIndexes bindings are bound to the arraycontroller. This 
all seems to play nicely together.

Next, the windowcontroller's document is observing the 'selection' property of 
the arraycontroller. The purpose is to get hold of whatever object is selected 
in the collectionview and link that to a 'tool' property of the document. Now, 
when I change the selection in the collectionview, the document is indeed 
notified, but what's puzzling me is that the value for the 'new' key in the 
change dictionary is 'null'. 

I've tried observing other arraycontroller properties, such as 
'selectionIndexes' or 'selectedObjects', and the document gets all the 
notifications, but 'new' as well as 'old' value in the change dictionary are 
always 'null', even though I can get a hold of the selected object using 
'[object selectedObjects]'. So why is this object not in the change dictionary? 

Thanks for any help.
-- 
Luc Van Bogaert

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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