Re: CoreData: How to alter attributes undoably?
Re: CoreData: How to alter attributes undoably?
- Subject: Re: CoreData: How to alter attributes undoably?
- From: mmalcolm crawford <email@hidden>
- Date: Sat, 25 Jun 2005 02:52:05 -0700
On Jun 24, 2005, at 2:38 PM, Frank Illenberger wrote:
Good idea, I tried this, but setPrimitiveValue:forKey: does also
register its change with the undo manager.
No, it doesn't.
<http://developer.apple.com/documentation/Cocoa/Reference/
CoreData_ObjC/Classes/NSManagedObject.html#//apple_ref/doc/uid/
TP30001171-BBCEBFCH>
Have you overridden this method (setPrimitiveValue:forKey:), or are
you invoking the change notification methods before and after?
NSManagedObjectContext *moc = [self managedObjectContext];
[moc processPendingChanges];
[[moc undoManager] disableUndoRegistration];
[self setSomeAttribute:@"Some Value"];
[moc processPendingChanges];
[[moc undoManager] enableUndoRegistration];
This should work -- again what other methods are being invoked and when?
mmalc
_______________________________________________
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