• 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: Getting warning when saving merged MOC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting warning when saving merged MOC


  • Subject: Re: Getting warning when saving merged MOC
  • From: Rick Mann <email@hidden>
  • Date: Tue, 5 Jan 2010 00:54:51 -0800

On Jan 5, 2010, at 00:07:55, Rob Keniger wrote:

>
> On 05/01/2010, at 5:35 PM, Rick Mann wrote:
>
>> Am I doing something wrong, or failing to take some step to avoid this confusion? There may be legitimate changes in MOC A that need to be saved, but the merged changes should already be in the store.
>
>
> When doing things like this that you don't want the undo manager to pick up on, you just need to disable undo while you perform the operation, making sure you flush changes before re-enabling it:
>
> [moc processPendingChanges];
> [[moc undoManager] disableUndoRegistration];
>
> //do some stuff that alters the moc
>
> [moc processPendingChanges];
> [[moc undoManager] enableUndoRegistration];

Well, bracketing the merge call with that prevents the first MOC from showing as dirty, but if I make a subsequent change to it, and then try to save, I still get that warning that another app has modified the data, and those changes will be lost if I continue.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Getting warning when saving merged MOC (From: Rick Mann <email@hidden>)
 >Re: Getting warning when saving merged MOC (From: Rob Keniger <email@hidden>)

  • Prev by Date: Re: Getting warning when saving merged MOC
  • Next by Date: Re: iPhone: NSXMLParser problems
  • Previous by thread: Re: Getting warning when saving merged MOC
  • Next by thread: Re: Getting warning when saving merged MOC
  • Index(es):
    • Date
    • Thread