• 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
Re: recovering from EOF error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recovering from EOF error


  • Subject: Re: recovering from EOF error
  • From: Art Isbell <email@hidden>
  • Date: Wed, 28 May 2003 10:48:47 -1000

On Wednesday, May 28, 2003, at 08:31  AM, Jonathan Rochkind wrote:

Now... how do I recover? How do I get the EC in a state where I can call saveChanges() again, and it will try to save it's other changes again, but won't try to commit the delete, because it somehow knows this object has already been deleted?

Sending the editing context a revert() message will restore it to its state after the last saveChanges(). But if you have made several changes, only one of which is causing problems, revert() would require that you apply all changes again which can be a pain.


A less drastic approach is to use the editing context's NSUndoManager. Undo operations back to the operation that failed, remove the failed operation from the redo stack (removeAllActionsWithTarget()), and then redo all undone operations.

I typically try to avoid saving multiple changes unless the changes are dependent upon one another. This avoids recovery problems.

Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: recovering from EOF error
  • Next by Date: File access...
  • Previous by thread: Re: recovering from EOF error
  • Next by thread: File access...
  • Index(es):
    • Date
    • Thread