Android Question How to use MsgBoxAsync with wait for?

LucaMs

Expert
Licensed User
Longtime User
I understand how to use the version 2 of MsgBoxAsync with Wait For:
B4X:
Msgbox2Async("Message", "Title", "Positive", "Cancel", "Negative", Bmp, False)
    Wait For MsgBox_Result (Result As Int)
    If Result = DialogResponse.NEGATIVE Then

but not how to use the simple MsgBoxAsync; this does not work:
B4X:
Wait For MsgboxAsync("Message", "Title")
 

LucaMs

Expert
Licensed User
Longtime User
Answer: same way:
B4X:
MsgboxAsync("Message", "Title")
Wait For MsgBox_Result (Result As Int)

The contextual help has deceived me, it seems that the "version 1" does not return a value:
upload_2017-12-5_14-55-28.png
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
BTW, in most cases there is no reason to wait for the user to close it. Just show it and continue. It is not the same as Msgbox2Async where you are waiting for the user choice.
Yes, but in my case I have to inform the user that he must update the app and then close it.



Thank you
 
Upvote 0
Top