'Cleaning' a Text Window
Posted: Mon Nov 19, 2018 3:39 pm
I wish to open a Text Window, write into it, and then have it marked 'Clean' as if I had just read it from file.
I use the code fragments:
This does indeed 'clean' the icon in the top left of the Window, but does not empty the Edit->Undo stack. How do I do that?
I use the code fragments:
Code: Select all
IMPORT Sequencers, TextModels, TextViews
VAR seq: ANYPTR; text : TextModels.Model; view : TextViews.View;
text := ...; (* sets up my Text *)
view := TextViews.dir.New (text);
Views.OpenView (view);
... Write to text ...
seq := text ().Domain ().GetSequencer ();
WITH seq : Sequencers.Sequencer DO seq.SetDirty (FALSE) END