Re: NSTextView undo/redo question
Re: NSTextView undo/redo question
- Subject: Re: NSTextView undo/redo question
- From: Bill Cheeseman <email@hidden>
- Date: Mon, 20 Aug 2001 15:56:18 -0400
on 8/19/01 10:31 PM, Brian Webster at email@hidden wrote:
>
One approach that might help figure stuff out would be to create
>
a subclass of NSUndoManager and override the
>
registerUndoWithTarget:selector:object: and
>
prepareWithInvocationTarget: methods to print out NSLogs keeping
>
track of what undo actions are getting registered. You could at
>
least use this method to try to figure out what objects to pass
>
to removeAllActionsForTarget:.
I did this, and the target turns out always to be an instance of
NSConcreteTextStorage. This is a private class, so I can't think of any way
to pass it to removeAllActionsWithTarget:.
So I will have to pursue the first route you suggested, creating my own undo
manager for the text fields that are to have on-the-fly undo/redo, then
calling removeAllActions on that undo manager.
Thanks for your thoughts. You have helped me to focus on the problem.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
The AppleScript Sourcebook - www.AppleScriptSourcebook.com
Vermont Recipes - www.stepwise.com/Articles/VermontRecipes