I attach the .iai that I am currently working with. BatMon50.aia (607.3 KB)
Using Ubuntu with Android 11, I get an absolutely consistent response: runtime error the moment selectTab is included.
:-((((
The only alternative that I can think of is to rebuild all the layouts xxxVerticalArrangement in the Designer so that they possibly lie in a different part of the code than now. That will be quite a job.
I believe I have now found the problem, after much searching and testing. Back where I started with
the Spinner
In the Designer you are setting the elementsFromString
Then in Screen Initialise you set the spinner elements to a list
Then when running the ChartTab Click event, you look for Selection Index 1 to set it
For some reason, the spinner has got upset about this, and cannot find a list to work with, thus generating the runtime error, when the arrangement is made visible.
Removing the ElementsFromString in the Designer appears to resolve the problem.
I am not sure why this happens, it shouldn't, could be a timing issue as @SteveJG suggested....will have to do some testing when I get a moment.
A huge thank you for doing this trouble shooting. Your time and effort is appreciated enormously. Next I wil reorganise the Bluetooth coms code as discussed previously when I have a slot of time.