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 (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to