[CoreData] How can I use the Undo manager to recover from errors?
[CoreData] How can I use the Undo manager to recover from errors?
- Subject: [CoreData] How can I use the Undo manager to recover from errors?
- From: Kaspar Fischer <email@hidden>
- Date: Mon, 13 Feb 2006 19:45:29 +0100
Hi everybody,
I add a new entity to my object graph using NSEntityDescription's
-insertNewObjectForEntityForName:inManagedObjectContext:. If after
this an error occurs, I have to delete the object again in order
to recover from the error. So I thought, I'd do a
[managedContext undo]; // (*)
to undo the insertion. But in this case, of course, I do not want
the user to be able to "redo" the action (this is confusing for
him/her). Is there a way to tell the Undo manager to ignore this
last action?
(Using -deleteObject: instead of the above (*) leads to a
similar problem: the user sees an Undo/Redo pair which apparently
does nothing at all...)
Thanks,
Kaspar
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden