Re: Getting warning when saving merged MOC
Re: Getting warning when saving merged MOC
- Subject: Re: Getting warning when saving merged MOC
- From: Rob Keniger <email@hidden>
- Date: Tue, 5 Jan 2010 18:07:55 +1000
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];
--
Rob Keniger
_______________________________________________
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