• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to observe Core Data add/remove actions?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: How to observe Core Data add/remove actions?
      • From: Joshua Emmons <email@hidden>
  • Prev by Date: Core Data: Cross-Model Relationships
  • Next by Date: Memory limits under Garbage Collection, NSMutableData vs. malloc()
  • Previous by thread: re: Core Data: Cross-Model Relationships
  • Next by thread: Re: How to observe Core Data add/remove actions?
  • Index(es):
    • Date
    • Thread