objective c - NSArrayController and the exception "CoreData could not fulfill a fault" -


I have a list of items, examples of the item class saved in the core data model.

This item is shown using an NSArrayController and cocoa binding in NSTableView . It works all too well.

However, when I extract some items using these instructions:

  extract items selected for item (item * self.itemsArrayController.selectedObjects In item) {[self. Managed object contact deleted object: item]; } NSError * Error = Zero; If (! [Managed Object Contact Contact: & amp; Error]) [[NSAPCirmation Shared Application] Current Error: Error]; }   

After some time , I get an exception CoreData could not complete a mistake .

All the documents I read that I found (including), but I did not find anything useful.

I am using the new ARC (automated reference count), so I'm pretty sure I am not trying to save the managed object reference after the managed object that was deleted.

UPDATE: My app is a single thread, so I'm not trying to reach them managed object contacts with multiple threads.

You enumerate selected items of the array controller, and calculate when deleting objects. Try:

  NSArray * Selected objects = [[self.itemsArrayController selected object] Copy]; (Item in selected object) for [[Self. Managed object contact deliobject: item]; } [Selected objects release];    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -