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 protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
