Sub something1
Show("aaa")
End Sub
Sub something2
Show("bbb")
End Sub
Sub something3
Show("ccc")
End Sub
Sub Show( cTxt As String )
log(cTxt)
CallSubDelayed(Me,"Show_Completed")
End Sub
Considering that it is not used Wait For Show_Completed
Thank you.
I have not found any problem
I "match" the "wait of" with their "callsubdelayed".
But I was looking at a partner's code and I saw that he does things similar to the code that I have set as an example.
So I was wondering what it can affect.
Then if "Show_Completed" does not exist, the following "Show" instruction will be executed, if it exists.
For example:
B4X:
Sub Show( cTxt As String )
log(cTxt)
CallSubDelayed(Me,"Show_Completed")
log("Hello, World")
End Sub
"Hello world" will be displayed.
I thought that those instructions were left in a "queue" waiting to be executed. And the accumulation of those calls would fill the queue and cause some problem.
yes, if you call the Show_Completed it will make a small delay (until this sub end) in your app direct.
and the collection of events call this Show_Completed unnecessary.
if you would store it as status you can act only at a new status.