CoreData: How to alter attributes undoably?
CoreData: How to alter attributes undoably?
- Subject: CoreData: How to alter attributes undoably?
- From: Frank Illenberger <email@hidden>
- Date: Fri, 24 Jun 2005 12:45:39 +0200
Hi,
I want to make a change to some attribute in an NSManagedObject that
should not be undone when the user presses the undo key. Normally, I
am used to call disableUndoRegistration on the MOC's NSUndoManager
before making the change and enableUndoRegistration after it. But
this does not work with CoreData. Even the following procedure still
allows the user to undo the change:
NSManagedObjectContext *moc = [self managedObjectContext];
[moc processPendingChanges];
[[moc undoManager] disableUndoRegistration];
[self setSomeAttribute:@"Some Value"];
[moc processPendingChanges];
[[moc undoManager] enableUndoRegistration];
Is there a way to achieve the desired behaviour?
Cheers
Frank
_______________________________________________
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