Re: CoreData: How to alter attributes undoably?
Re: CoreData: How to alter attributes undoably?
- Subject: Re: CoreData: How to alter attributes undoably?
- From: Lee Morgan <email@hidden>
- Date: Fri, 24 Jun 2005 17:35:51 -0400
Don't know if this would work or not, but you might consider using NSManagedObject's setPrimitiveValue:forKey: It doesn't invoke change notifications, and assuming thats what allows CoreData to manage it's undo stack you might not have to deal with the context's undo manager registration at all.
- Lee
On Jun 24, 2005, at 6:45 AM, Frank Illenberger wrote:
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?
|
_______________________________________________
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