Re: CoreData: How to alter attributes undoably?
Re: CoreData: How to alter attributes undoably?
- Subject: Re: CoreData: How to alter attributes undoably?
- From: Frank Illenberger <email@hidden>
- Date: Fri, 24 Jun 2005 23:38:04 +0200
Good idea, I tried this, but setPrimitiveValue:forKey: does also register its change with the undo manager. Frank Am 24.06.2005 um 23:35 schrieb Lee Morgan: 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