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.

[CODE lang="b4x" title="What am I doing wrong..." highlight="4"] 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[/CODE]
 
Code:
Msgbox2Async("Question?", "Title", "Yes", "Cancel", "No", Null, False)
You are missing the word 'False' in the line: xui.Msgbox2Async(
 
Last edited:
Upvote 0
In B4J version 9.8 (64 bit) the IDE shows the following:
1680408518890.png

And the copied code is:
[CODE lang="b4x" highlight="3"] 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
[/CODE]
In line 3 you can see that there is an underscore (_) and not a dot (.)
 
Upvote 0
Back
Top