01-02-2020 16:10
01-02-2020 16:10
I must be missing something, but I can't figure out how to display a string variable in the index.gui file.
Any help would be appreciated.
Answered! Go to the Best Answer.
01-03-2020 08:37
01-03-2020 08:37
Unfortunately, there is no data-binding mechanism here. You need to get the UI element in your app/index.js by calling
let element = getElementById("YOU_UI_ELEMENT_ID")
and then set the text on the UI element object.
element.text = "YOUR_TEXT";
01-02-2020 16:24
01-02-2020 16:24
You can't. You have to use javascript to maniplate the appropriate index.gui element.
01-03-2020 08:37
01-03-2020 08:37
Unfortunately, there is no data-binding mechanism here. You need to get the UI element in your app/index.js by calling
let element = getElementById("YOU_UI_ELEMENT_ID")
and then set the text on the UI element object.
element.text = "YOUR_TEXT";
01-04-2020 12:10
01-04-2020 12:10
How do I get the ui element id and where do I put the variable? Would it be
element.text = var test;
or not?
Sry for asking stupid questions 😉
01-04-2020 12:15
01-04-2020 12:15
Have a look at the example code here.