Can i add my own undo objects to the undo stack?

SyntaxEditor .NET Languages Add-on for Windows Forms Forum

Posted 15 years ago by GeorgeNY - CTO, RatchetSoft, LLC
Version: 4.0.0281
Avatar
I have a button in my toolbar to convert code from VB to C#. If the user clicks it, the code is converted and the editor text reflects that. Now, if the user clicks undo, there is more to do than just rollback the text in the editor. I need to also reset the language.

1) How can i handle this?
2) Is there a way to add my own objects to the undo stack and handle them myself?

Thanks

George P Weihs

Comments (1)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
George,

There isn't a way to store custom data right now. Best thing you could do at this point is maybe hook into SyntaxEditor.DocumentUndoRedoStateChanged and examine event arguments there. Based on the action that is occurring, keep your own external stack with that info.

That being said, we are currently prototyping out a future more advanced framework for SyntaxEditor with our WPF version development. And one feature we do have there already is the ability to store custom data with undo entries.


Actipro Software Support

The latest build of this product (v24.1.0) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.