• 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: inspecting undo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inspecting undo


  • Subject: Re: inspecting undo
  • From: "I. Savant" <email@hidden>
  • Date: Thu, 31 Jul 2008 13:03:54 -0400

On Thu, Jul 31, 2008 at 12:52 PM, James Maxwell
<email@hidden> wrote:

> AFAIK there's no way to print the whole undo stack, but can I just see the
> top?

  There's no public API for directly accessing the stacks (undo and
redo), however you could do the following:

1 - Subclass NSUndoManager.
2 - Override the appropriate methods ( -registerUndoWithTarget:... and
-prepareWithInvocationTarget: ) and provide logging before calling
super.
3 - Return a shared instance of your undo manager subclass for the
desired window(s) via the -[NSWindow windowWillReturnUndoManager:]
delegate method.

  Of course this doesn't help with the redo stack, just what's added
to the undo stack.

--
I.S.
_______________________________________________

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: inspecting undo
      • From: Timothy Wood <email@hidden>
References: 
 >inspecting undo (From: James Maxwell <email@hidden>)

  • Prev by Date: Re: Making child windows move with their parents
  • Next by Date: CALayer drawing "transition" effect?
  • Previous by thread: inspecting undo
  • Next by thread: Re: inspecting undo
  • Index(es):
    • Date
    • Thread