I have a programmatic NSArrayController wired up to a Core Data managed object 
context. I need to know what objects are added or removed from arrangeObjects.

I have tried using KVO but that did not work. When KVO is used to observe 
arrangedObjects, the notification only indicates that the content has changed. 
It does not indicated what objects were added or removed.

I thought about overriding some of the NSArrayController add / remove methods 
and identifying which objects are added or removed. But when objects are added 
to the managed object context, the only NSArrayController method that gets 
called is setContent:. None of the add or insert methods are called.

It is interesting to note that when objects are removed from the managed object 
context, some of the NSArrayController remove methods are called but 
setContent: is not called. This is just the opposite of what happens when 
adding objects to the managed object context.

Does anyone have any insight on how to determine what objects are added or 
removed from an NSArrayController?

Thanks,
Richard Somers


_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to