• 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
core data - delete of object.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

core data - delete of object.


  • Subject: core data - delete of object.
  • From: John Clayton <email@hidden>
  • Date: Mon, 17 Nov 2008 22:51:31 +0100

Hi All,

I'm using core-data and need to know when a particular core-data object (derived from NSManagedObject of course) is about to be deleted. I'm deleting objects simply by using the managed object context's deleteObject method, like this:
[[theObject managedObjectContext] deleteObject:theObject];


Is there a way to be notified immediately of the delete? I need to know immediately, not only when the context is saved. Am I missing something painfully obvious here?

now, I could of course put a 'deleteThisObject' method onto the class I'm deleting, but isn't there a core-data way to handle this?

I've tried catching the NSManagedObjectContextObjectsDidChangeNotification notification - but that only fires on context saves, same with the willTurnIntoFault method as well as the dealloc - all these methods are only ever called when the context is being saved - which in my case is (a) unpredictable, (b) too late .

Help / tips are greatly appreciated,

Thanks
--
John Clayton
Skype: johncclayton




_______________________________________________

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: core data - delete of object.
      • From: Jim Correia <email@hidden>
  • Prev by Date: Re: Writing a more usable AppleEvent logger
  • Next by Date: OutlineView, bindings and array of NSDictionaries.
  • Previous by thread: Re: NSDateFormatter strangeness
  • Next by thread: Re: core data - delete of object.
  • Index(es):
    • Date
    • Thread