Posted 19 years ago
by Kasper
Hi,
In my application, I only have one instance of the SyntaxEditor. The user can of course have multiple open documents, so whenever the user changes between two documents, I simply take the relevant information from the SyntaxEditor, e.g. content, cursor position etc. and save it to an object, and then I load the other object into the SyntaxEditor. This works very well. However, I can't seem to do this with the Undo/Redo information of the SyntaxEditor. I thought I could simply save a copy of the UndoStack from SyntaxEditor.Document.UndoRedo, but it's readonly, so I can't assign the object from my document object. Do you have any idea how I can do this?
[Modified at 05/28/2006 01:26 PM]
In my application, I only have one instance of the SyntaxEditor. The user can of course have multiple open documents, so whenever the user changes between two documents, I simply take the relevant information from the SyntaxEditor, e.g. content, cursor position etc. and save it to an object, and then I load the other object into the SyntaxEditor. This works very well. However, I can't seem to do this with the Undo/Redo information of the SyntaxEditor. I thought I could simply save a copy of the UndoStack from SyntaxEditor.Document.UndoRedo, but it's readonly, so I can't assign the object from my document object. Do you have any idea how I can do this?
[Modified at 05/28/2006 01:26 PM]