And then set a label text to that global variable thus:
Why does it return 30?
I know in the documentation that 30 is the system default thumb position, but should not the settings I create in the Designer void those and use my settings nominated in the first image above?
Probably unrelated, but I have been getting a lot of lag and even timeout errors when I switch between Designer and Blocks windows over the last few days.
I do have an initClock already for some problematic Canvas and imageSprite stuff. That is set to 1ms.
I inserted:
and also tried the initClock at 250ms, but it made no difference. Tried in both Companion and compiling APK.
However, If I use:
in the initClock (set to 1ms), it resolved the issue.
It seems like the:
Is being compiled prior to the base settings for the slider being adjusted to my values. The compiler then sorts everything else out but mistakenly leaves the global variable thumbTimeScale at the original value of 30.
App Inventor is basically a complex programming language simplified in the form of blocks. In almost every language, Global variables are initialised before everything else.
In order to fix this, instead setting the value during initialisation, set it with the "Set Variable" block.
Has been working well for my Canvas/imageSprite issue and now the slider thumb position issue.
I'll keep it in mind if I start seeing a return to unexpected behaviour on these elements.
Perhaps it's not so much about what the timer delay is set at, but rather when within the nitty-gritty of the compilation that the timer is first initiated. It may be one of the last things to kick-off in the process of setting global variables, overriding defaults, setting up the screens etc, so the actual timer interval may not matter so much for some elements.