• 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: Lion: Lock documents and custom undomanager
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lion: Lock documents and custom undomanager


  • Subject: Re: Lion: Lock documents and custom undomanager
  • From: Quincey Morris <email@hidden>
  • Date: Fri, 10 Feb 2012 19:17:46 -0800

On Feb 10, 2012, at 15:03 , Mike Abdullah wrote:

> My line of thinking:
>
> Each time one of your undo managers is about to close its top-level group, register that with the doc's main undo manager. Thus the doc's undo manager will see the change while locked, prompt the user to unlock, and if they do choose to cancel, will undo the change to individual undo manager. Something like:
>
> - (void)undoManagerWillCloseGroup:(NSNotification *)notification
> {
> 	NSUndoManager *manager = [notification object];
> 	if ([manager groupingLevel] == 1)
> 	{
> 		[[[self document] undoManager] registerUndoWithTarget:manager selector:@selector(undo) object:nil];
> 	}
> }

Won't this have the effect of causing successive undos to affect various pages, according to the order things were originally done, rather than just undoing within the current "page"? That is, won't it undo on a global "timeline" rather than a per-page timeline?

I don't recall that this was discussed, but what happens if the document's undo manager is changed to the page undo manager every time page switch occurs? I can't work out if the OP tried this and found that the document's "edited" status doesn't capture the undo manager states properly, or if the OP didn't try this.


_______________________________________________

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


  • Follow-Ups:
    • Re: Lion: Lock documents and custom undomanager
      • From: Mike Abdullah <email@hidden>
References: 
 >Lion: Lock documents and custom undomanager (From: Georg Seifert <email@hidden>)
 >Re: Lion: Lock documents and custom undomanager (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: Instruments won't symbolicate the call tree. What now?
  • Next by Date: unknown type name virtual when using c++ in Xcode 4.2.1
  • Previous by thread: Re: Lion: Lock documents and custom undomanager
  • Next by thread: Re: Lion: Lock documents and custom undomanager
  • Index(es):
    • Date
    • Thread