In https://github.com/orgs/numberscope/discussions/6#discussioncomment-10215660, Kate describes an unfortunate trap in which updating an array of (say) sequence values needs to update the description of a different parameter, e.g. turn angles. Hence it calls refreshParams. But then typing a single space at the end of an existing input for the array ends up deleting the space via the canonicalization of input from refreshParams.
There are two plausible ways out of this trap:
Don't canonicalize input -- if the current value of the tentative parameter would decode into the current value of the actual parameter, leave the tentative value alone.
Add an argument to refreshParams that says which parameter is being refreshed (or no arg for all of them), and don't touch other parameters.
I'd recommend trying 1 first to see if it seems to work OK, as it is much simpler.
This improvement is needed for the Turtle overhaul for alpha.
Apparently #1 is already implemented in ui2: Having a "3" in an input field and inserting a 0 before it to make "03" which used to be canonicalized to "3" now leaves the "03" there. Hence closing this issue.
In https://github.com/orgs/numberscope/discussions/6#discussioncomment-10215660, Kate describes an unfortunate trap in which updating an array of (say) sequence values needs to update the description of a different parameter, e.g. turn angles. Hence it calls refreshParams. But then typing a single space at the end of an existing input for the array ends up deleting the space via the canonicalization of input from refreshParams.
There are two plausible ways out of this trap:
I'd recommend trying 1 first to see if it seems to work OK, as it is much simpler. This improvement is needed for the Turtle overhaul for alpha.