I melted , I puzzled to find a solution that actually should not be sought , why ?, in developing an app , I came across a condition that I did not expect . In essence it is a classic Do Until/ loop , from which comes out when the value of a variable changes , do not understand , but you point in a strange way , in the various languages adopted in time, where these common cycles are normally used , here block any activity , even if I have vague memories , or to have them already used in B4A and seeing them work properly , place a simplified code :
in essence , is called the sub Start , this should ' loopare ' until the value of the UCC variable does not change , then this variable should be modified simply by clicking on the button , the Click event when it takes the action , then you should get out of the loop and return to the point next to the call of the Sub Start .
Well , it does not come out piuuuuuù , although it denotes the pressure button . In any language that respects I used this form to make sure that a certain condition had occurred and then resume from the next .
That idea you have on the matter ?
B4X:
Sub Start As Boolean
ucc=0
Do Until ucc=1
DoEvents
Loop
End Sub
Sub Button1_Click
ucc=1
DoEvents
Msgbox (ucc,"Valore")
End Sub
in essence , is called the sub Start , this should ' loopare ' until the value of the UCC variable does not change , then this variable should be modified simply by clicking on the button , the Click event when it takes the action , then you should get out of the loop and return to the point next to the call of the Sub Start .
Well , it does not come out piuuuuuù , although it denotes the pressure button . In any language that respects I used this form to make sure that a certain condition had occurred and then resume from the next .
That idea you have on the matter ?