Re: Strange Undo action for caching based on transient properties
Re: Strange Undo action for caching based on transient properties
- Subject: Re: Strange Undo action for caching based on transient properties
- From: Grigory Entin <email@hidden>
- Date: Thu, 22 Nov 2007 18:18:33 +0300
Hello Mike,
On Thu Nov 22 2007 at 14:01, Mike Abdullah <email@hidden> wrote:
> You can "join" it with the previous undo like so:
>
> NSManagedObjectContext *moc = [self managedObjectContext];
> [moc processPendingChanges];
> [[moc undoManager] disableUndoRegistration];
>
> Do the work here
>
> [moc processPendingChanges];
> [[moc undoManager] enableUndoRegistration];
Thanks a lot, Mike!!! It works!
Though, frankly I don't understand why it results in the "join"..
I do understand from the documentation that -processPendingChanges
should record the pending changes in the undo manager, but I think it
should be "nop" if undo registration is disabled. But as far as I see
now, I'm wrong..
Is it some magic? Is -processPendingChanges a "priveleged" method that
results in the "join" if undo registration is disabled, due to some
inner "contract" between moc and undo manager? Or is it just some
aspect of undo manager that I don't understand? It just doesn't fit in
my head..
Regards,
Grigory
_______________________________________________
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