Hi,
I'm trying to paint a different screen, each time a button a pressed. I have the screen painting routine - mainly just some buttons on the top and a text box - inside a Do While Loop.
If I comment out the Do While Loop, then the screen paints fine. But if I put the Do While Loop back in, then there's an Unreachable statement error, that points to the MainForm.Show line.
Is it possible to relabel components and refresh the display, inside a Do While? Where should the MainForm.Show be placed, so that it doesn't cause any trouble?
The following is just pseudo-code. The actual code is too complicated, right now.
I'm trying to paint a different screen, each time a button a pressed. I have the screen painting routine - mainly just some buttons on the top and a text box - inside a Do While Loop.
If I comment out the Do While Loop, then the screen paints fine. But if I put the Do While Loop back in, then there's an Unreachable statement error, that points to the MainForm.Show line.
Is it possible to relabel components and refresh the display, inside a Do While? Where should the MainForm.Show be placed, so that it doesn't cause any trouble?
The following is just pseudo-code. The actual code is too complicated, right now.
B4X:
Do While True
' Paint buttons and screen
'...
'...
MainForm.RootPane.AddNode( btn....
'.....
MainForm.Show
If b_ThisIsTrue
Exit
End If
Loop
'...
'...