Texteditor.Contents is slow, but there is a workaround

Discuss GUI programming with the MUI Royale plugin here
Post Reply
User avatar
lazi
Posts: 646
Joined: Thu Feb 24, 2011 11:08 pm

Texteditor.Contents is slow, but there is a workaround

Post 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. :-)
User avatar
airsoftsoftwair
Posts: 5830
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

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

Post by airsoftsoftwair »

Hmm, this should probably be reported to the TextEditor.mcc authors. Have you tried if using Texteditor.Insert is faster?
Post Reply