Hello everyone! I have to update an old project, and I have to replace the old Msgbox with the new MsgboxAsync. With this last, I have a strange behavior: after invoking the MsgboxAsync, the message appears on the display but the execution continues regardless. I think I have mistaken the management of synchrony. Here is the piece of code in question:
After the execution of the line with the Wait For, the message is shown correctly on the display, but the execution continues with the Set_Layout function (as if the execution of Set_App were interrupted and continues with the next function present in the Activity_Create). Can you tell me where am I wrong? Thank you so much
B4X:
Sub Activity_Create (FirstTime As Boolean)
Set_App 'I call this function
Set_Layout
'etc...
End Sub
Sub Set_App
If File.Exists("percorso","abc.de") = False Then 'First run
Dim ro As Object = Msgbox2Async("File di avvio non trovato." & CRLF & "Utilizzare il fle di default?","File mancante","SÌ","","NO",Null,False)
Wait For (ro) Msgbox_Result (res As Int)
If res = DialogResponse.POSITIVE Then
'etc
End Sub
After the execution of the line with the Wait For, the message is shown correctly on the display, but the execution continues with the Set_Layout function (as if the execution of Set_App were interrupted and continues with the next function present in the Activity_Create). Can you tell me where am I wrong? Thank you so much