Re: inspecting undo
Re: inspecting undo
- Subject: Re: inspecting undo
- From: Timothy Wood <email@hidden>
- Date: Thu, 31 Jul 2008 20:22:19 -0700
On Jul 31, 2008, at 10:03 AM, I. Savant wrote:
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.
If you want, you can check out our overrides for this in
OmniFoundation's NSUndoManager(OFExtensions).
<http://www.omnigroup.com/ftp/pub/software/Source/MacOSX/Frameworks/>
-tim
_______________________________________________
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