B4J Question DialogResponse.Positive

sdawilson

New Member
Hi all,

I'm new to B4X and I'm struggling with this code block... I'm getting an error on line 4.

What am I doing wrong...:
    Dim sf As Object
    sf = xui.Msgbox2Async("Delete?", "Title", "Yes", "Cancel", "No", Null)
    Wait For (sf) Msgbox_Result (Result As Int)
    If Result = xui.DialogResponse.POSITIVE Then
        xui.MsgboxAsync("Confirmed", "B4X")
    End If
 

Mahares

Expert
Licensed User
Longtime User
B4X:
Msgbox2Async("Question?", "Title", "Yes", "Cancel", "No", Null, False)
You are missing the word 'False' in the line: xui.Msgbox2Async(
 
Last edited:
Upvote 0

PaulMeuris

Well-Known Member
Licensed User
In B4J version 9.8 (64 bit) the IDE shows the following:
1680408518890.png

And the copied code is:
B4X:
    Dim sf As Object = xui.Msgbox2Async("Delete file?", "Title", "Yes", "Cancel", "No", Null)
    Wait For (sf) Msgbox_Result (Result As Int)
    If Result = xui.DialogResponse_Positive Then
        Log("Deleted!!!")
    End If
In line 3 you can see that there is an underscore (_) and not a dot (.)
 
Upvote 0
Top