[bug] empty string tests as not empty in 7.4.7, 7.4.8
Posted: Tue Aug 03, 2021 10:49 pm
This is a screenshot of two textbuttons and an input in between:
The input field is an empty string. The textbuttons' labels should both say "empty", as the input variable is empty.
Here is the code. If it's run from "Reload the script", then the bug doesn't appear, but if you return to Main menu and run it, the bug is there. It didn't happen in 7.4.6-.
The input field is an empty string. The textbuttons' labels should both say "empty", as the input variable is empty.
Here is the code. If it's run from "Reload the script", then the bug doesn't appear, but if you return to Main menu and run it, the bug is there. It didn't happen in 7.4.6-.
Code: Select all
default empty = ""
default empty_input = VariableInputValue(variable = "empty", returnable = True)
label start:
call screen test_default()
return
screen test_default():
vbox:
if empty == "":
$ if_empty = "Empty"
textbutton "[if_empty]" action Return()
else:
$ if_empty = "Not empty"
textbutton "[if_empty]" action Return()
frame background "#369":
input value empty_input
textbutton "[if_empty]" action Return()