• 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
Still can't delete CoreData object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Still can't delete CoreData object


  • Subject: Still can't delete CoreData object
  • From: Rick Mann <email@hidden>
  • Date: Tue, 25 Jun 2013 15:30:59 -0700

I have a situation in which I can't delete one of my core data objects from a UITableView. The list is built using NSFetchedResultsController, and I delete the objects after the user swipes to delete with

    Job* obj = [self.resultsController objectAtIndexPath: inIndexPath];
    [obj.managedObjectContext deleteObject: obj];

I then save the MOC.

My -controller:didChangeObject:atIndexPath:forChangeType:newIndexPath: delegate method gets called with NSFetchedResultsChangeDelete, and I call

    [self.tableView deleteRowsAtIndexPaths: @[ inIndexPath ] withRowAnimation: UITableViewRowAnimationAutomatic];

But then, as part of the same MOC -save: call, it gets a NSFetchedResultsChangeInsert. Interestingly, the address of the object inserted is the same as the address of the object that was just deleted, as is its x-coredata URI, but all of its properties have default values.

If I then try to delete the object again, it's data is <fault>, and the MOC -save method returns false, but no NSError is returned.

Any ideas?


--
Rick




_______________________________________________

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: Still can't delete CoreData object
      • From: Rick Mann <email@hidden>
  • Prev by Date: Re: Core Data Reverse Engineering KickStarter Project
  • Next by Date: Re: Still can't delete CoreData object
  • Previous by thread: Re: AVAudioMix volume/gain curve seems nonlinear
  • Next by thread: Re: Still can't delete CoreData object
  • Index(es):
    • Date
    • Thread