setText() changes designtime text. Bug or feature?

Reported before?
Just found out it has been reported before: " Text doesn’t reset (code)" I will not remove this one though because I think the extra info and different title may be helpfull to others…

Describe the bug
setText() changes designtime text

To Reproduce
Steps to reproduce the bug:

  1. Put a text on the stage (use the T tool and write something like “designtime text”)
  2. Change the text from a script (i.e. textExample.setText(“this is an example”); )
  3. Run the script (text changes from “designtime text” to “this is an example”
  4. Press pause --> text doesn’t change back to “designtime text”
  5. Fun fact: Pressing Ctrl-Z changes text back to designtime text

Expected behavior
Text will change back to “designtime text”

Screenshots
none

Computer Information

  • OS: Win10
  • Desktop
  • Chrome
  • Wick 1.19.3

I’ve noticed this behavior over a large number of assets that I change from my script (like click handlers that stack up and get invoked multiple times if your not carefull). This may be a feature, but I would personaly prefer a possebility to reset the project to it’s last design-state after script execution finishes.

1 Like

This is probably a bug since this didn’t happen in older versions of Wick.

I think I saw someone show a solution, i don’t remember who.

  • make a text box
  • name it something (like txt)
  • make it a clip
  • name the clip something (like myText)
  • when you want to change the text, do myText.txt.setText()

I haven’t tried it, and I need to leave my house in a bit, but you can see if it works.

I’ve aleady tried that for another reason (scope) but it doesn’t change this behaviour. Btw: If I clone the clip the text of the clone reverts back to the designtime version. The original clip remains unchanged.

1 Like

" Text doesn’t reset (code) " --> Will probably be fixed in V1.20