Is there in Xojo a function or command which gives the opportunity that the code breaks out of a routine, do something else, like mouseclick, and continues with the routine after the event (say mouseclick again).
I am from the vb6 generation and in there was a command available which did this:
If doevents() then
When you put this inside a loop, the loop will temporarely be broken, when ie. you click the mousebutton, do the event and returns to the loop and continues where it did leave the loop. This way we could also avoid that a screen locked while running a loop.
I run through several loops in the application I wrote in Xojo and everything is running fine, but you see that the windows are locked during the loops, this is physically shown that the window goes down on the screen by 1/10th mm and returns to its original position when the loop is ended.
This does not have any disturbance for the routine, but it gives a restless view on the screen.
At the moment the screen freezes temporarily the code runs through a 36 times loop which downloads a file (so, 36 files) from the internet, analyzes and formats it and write the results to disk in a uniform way, while the data from the internet is not received in a uniform way.
DO NOT USE DO EVENTS like you might have in VB
It’s NOT the same
Xojo is architecturally different than VB so its effects are different
IF you find you need a loop that leaves the UI responsive this is a good spot for a thread