First, the code, which I am using to select specific items from a B4XTable:-
I want to trap if the user clicks the close button on the message box without making a selection. There may be no way, but in any event I have not been able to find one.
My second question is if the user just closes on that button, what happens to the Sub with the Wait For - just it just sit there waiting until the application closes?
B4X:
Sub B4xTable1_CellClicked(ColumnID As String, RowId As Long)
Dim RowData As Map = B4XTable1.GetRow(RowId)
Dim cell As String = RowData.Get(ColumnID)
Log(cell)
Log("Number = " & Round(RowData.GetValueAt(0)) & " & Name = " & RowData.GetValueAt(1))
Dim MB2A As Object = xui.Msgbox2Async("Number = " & Round(RowData.GetValueAt(0)) & " & Name = " & RowData.GetValueAt(1),"Selected Item", "Add", "Done", "Discard", Null)
Wait For (MB2A) MsgBox_Result (Result As Int)
If Result = xui.DialogResponse_Positive Then
Log( "Positive - Add")
Else if Result = xui.DialogResponse_Negative Then
Log("Negative - Discard")
Else if Result = xui.DialogResponse_Cancel Then
Log("Cancel - Done")
End If
End Sub
I want to trap if the user clicks the close button on the message box without making a selection. There may be no way, but in any event I have not been able to find one.
My second question is if the user just closes on that button, what happens to the Sub with the Wait For - just it just sit there waiting until the application closes?