How to observe Core Data add/remove actions?
How to observe Core Data add/remove actions?
- Subject: How to observe Core Data add/remove actions?
- From: Arthur C. <email@hidden>
- Date: Tue, 13 Nov 2007 23:29:13 +0100
- Importance: Normal
I have a set of Core Data objects, which consist of properties that need to be communicated to other (non-Core Data) parts of the application. In fact, the properties of the currently selected object are 'active' and need to be communicated.
I currently observe the corresponding array controller for the key @"selection.myProperty" to do that.
When an object is added or removed, I observe "arrangedObjects.@count", which is indeed triggered on add/remove actions. However, when I read the selected properties, I still get the 'old' selected properties, not the ones from the new object.
So, what is the correct way to do this?
Thanks in advance,
Arthur C.
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/_______________________________________________
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