Button click

MLDev

Active Member
Licensed User
Longtime User
Hi Erel,

It is not recommended to create such loops. Not all events will fire and the app will not be responsive.

You should instead complete the current code execution and continue in Button_Click event.

I'm working on an app that simulates an old computer. I'm using this code to run machine code on the simulation:

B4X:
Sub runProg
   Do While tglSwitchRun.checked AND breakPoint = False
      DoEvents
      S0_fetch
      S1_execute
   Loop
   
   ...
   
End Sub

It seems to work fine. How should I do this?
 
Upvote 0
Top