• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Strange Undo action for caching based on transient properties
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Strange Undo action for caching based on transient properties (From: Grigory Entin <email@hidden>)
 >Re: Strange Undo action for caching based on transient properties (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: CoverFlow
  • Next by Date: Re: NSIndex with discontinuous values
  • Previous by thread: Re: Strange Undo action for caching based on transient properties
  • Next by thread: QTMovieLayer and renderInContext:
  • Index(es):
    • Date
    • Thread