• 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
[CoreData] How can I use the Undo manager to recover from errors?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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


  • Prev by Date: Re: Who's launching me?
  • Next by Date: [MEET] Chicago CAWUG / CocoaHeads - Tuesday 2/14
  • Previous by thread: Re: Class Memory Management
  • Next by thread: [MEET] Chicago CAWUG / CocoaHeads - Tuesday 2/14
  • Index(es):
    • Date
    • Thread