Page 1 of 1

Texteditor.Contents is slow, but there is a workaround

Posted: Thu Feb 20, 2025 9:55 pm
by lazi
Inserting a string to a texteditor gadget takes a veery long time unless it is just a few characters.

Code: Select all

Mui.Set("editor", "contents", string$, "haschanged", False)
If we can sacrifice the clipboard content we could do an instant string to texteditor gadget operation like this:

Code: Select all

SetClipboard(#CLIPBOARD_TEXT,string$)
Mui.DoMethod("editor", "paste")
ClearClipboard()   
Even very large string is shown instantly in the gadget, but maybe it would be a bit better to has a similarly fast "contents" function too. :-)

Re: Texteditor.Contents is slow, but there is a workaround

Posted: Tue Feb 25, 2025 10:38 pm
by airsoftsoftwair
Hmm, this should probably be reported to the TextEditor.mcc authors. Have you tried if using Texteditor.Insert is faster?