Closed MangelMaxime closed 4 years ago
Line 8: You pass edit1
to ui:property
, but don't retrieve its return value (the updated property value). Change this:
ui:property("", 0, edit1, 3, 1, 1)
To this:
edit1 = ui:property("", 0, edit1, 3, 1, 1)
Oh ok, is this behaviour always the same?
I mean if I pass a table it will get updated directly, otherwise I have to store the result ?
Thank you for the quick answer :)
Yes, this behavior is common among all widgets that take values. If you pass a table to ui:slider
for example, the table's value
field will be updated. If you pass a number, ui:slider
will return the new number. Hope that helps.
Hello,
when passing directly a number to
ui:property
the value can't get updated from the UI component.However, if I pass it by wrapping it in a table (like in
edit2
) then it works.Am I doing something wrong?