Re: Why does Core Data retain an object when one of that object's attributes is changed?
Re: Why does Core Data retain an object when one of that object's attributes is changed?
- Subject: Re: Why does Core Data retain an object when one of that object's attributes is changed?
- From: Marco Masser <email@hidden>
- Date: Thu, 14 Aug 2008 21:53:00 +0200
Two words. Un Do.
But of course. Thanks.
I don't know how I could not figure that out, considering that I am
disabling & enabling the undo manager and grouping actions together in
other parts of my app already.
For future reference:
http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdMemory.html#/
/apple_ref/doc/uid/TP40001860-SW2
Temporarily disabling the undo manager:
[[moc undoManager] disableUndoRegistration];
[myObject setValue:[NSNumber numberWithBool:YES]
forKey:@"myBoolAttribute"];
[moc processPendingChanges]; // Don't forget that!
[[moc undoManager] enableUndoRegistration];
Permanently disabling the undo manager:
[moc setUndoManager:nil];
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden