• 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: CoreData "Could Not Merge Changes"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData "Could Not Merge Changes"


  • Subject: Re: CoreData "Could Not Merge Changes"
  • From: Jesse Grosjean <email@hidden>
  • Date: Mon, 15 Aug 2005 09:47:16 -0400

Making several assumptions, you can sort of work around it using -
rollback, but I haven't worked through this properly yet (notably the
final segment of the attemptRecoveryFromError method) -- and I really
must get to sleep at some point...

Yes first get some rest, and thanks for all the help on this list.

I've found that saving immediately after each undo/redo operation seems to fix the problem. I do it by adding these lines to my documents init method:

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(saveDocument:) name:NSUndoManagerDidUndoChangeNotification object:[[self managedObjectContext] undoManager]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(saveDocument:) name:NSUndoManagerDidRedoChangeNotification object:[[self managedObjectContext] undoManager]];


This works OK for my application because I always handle saving, not the user. But of course it would create problems in a normal document based application where the user is in charge of saving. Plus it's a bit of a performance problem, but that's better then breaking.

Jesse
_______________________________________________
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: path name from Apple Event
  • Next by Date: Re: path name from Apple Event
  • Previous by thread: Re: CoreData "Could Not Merge Changes"
  • Next by thread: Re: CoreData "Could Not Merge Changes"
  • Index(es):
    • Date
    • Thread