The msgbox2 (or BetterDialogs version) is not waiting for a user touch screen response to the dialog that is presented.
This section below (from the Logs file) shows that it "seems" to have got a response and processed it, yet no screen press was given.
When the selection was called - the response should have been... (stop at the modal dialog and WAIT for a response)
B4a (5.02 (1)
This is the sub that calls it all (below)...
I have tried the IF, Else, End If as well as the CASE method.
Both produce the same result.
Note: After some compiles (I have noticed), it WILL stop as one would expect, allowing me to select the correct item to build the correct data from (button selection in dialog). But now, it never halts on the (modal) msgbox2 and selects the CANCEL option..???
It is probably me, but every time I FIX some other issue (and there were many), I introduce some other strange behavior that did not appear/exist before. WTH?
This seems pretty straight forward, yet it confounds.
This section below (from the Logs file) shows that it "seems" to have got a response and processed it, yet no screen press was given.
B4X:
getting a trailer... wait here...-999
GOT a trailer22... selected: 78111
See if we have a pretrip on file -CheckCurrInspect4Pre 1234 Unit: 2
See if we have a pretrip on file -CheckCurrInspect4Pre 1321 Unit: 2
Build existing post trip -BuildPostTrip - using pretrip? -false
built existing post-trip inspection for trailer
When the selection was called - the response should have been... (stop at the modal dialog and WAIT for a response)
B4a (5.02 (1)
B4X:
getting a trailer... wait here...-999
This is the sub that calls it all (below)...
I have tried the IF, Else, End If as well as the CASE method.
Both produce the same result.
Note: After some compiles (I have noticed), it WILL stop as one would expect, allowing me to select the correct item to build the correct data from (button selection in dialog). But now, it never halts on the (modal) msgbox2 and selects the CANCEL option..???
It is probably me, but every time I FIX some other issue (and there were many), I introduce some other strange behavior that did not appear/exist before. WTH?
This seems pretty straight forward, yet it confounds.
B4X:
Sub GetATrailer As Int
Dim gettrl1 As Int = -999
If DefCM.DefTrlNum = "" Then
Log(" No trailer num - returned...")
Return 0
End If
Log(" getting a trailer... wait here..."&gettrl1)
If DefCM.DefTrlNum2 <> "" Then
If DefCM.DefTrlNum3 <> "" Then
Select BDmod.MB("Select Trailer"," Select The Trailer To Inspect",DefCM.DefTrlNum, DefCM.DefTrlNum2,DefCM.DefTrlNum3)
' i = Msgbox2(" Select The Trailer To Inspect","Select Trailer",DefCM.DefTrlNum, DefCM.DefTrlNum2,DefCM.DefTrlNum3,Null)
Case DialogResponse.POSITIVE
DefCM.InspTrl = DefCM.DefTrlNum
Log(" GOT a traile1r... selected: "&DefCM.InspTrl)
Return 1
Case DialogResponse.CANCEL
DefCM.InspTrl = DefCM.DefTrlNum2
Log(" GOT a trailer2... selected: "&DefCM.InspTrl)
Return 2
Case DialogResponse.NEGATIVE
DefCM.InspTrl = DefCM.DefTrlNum3
Log(" GOT a trailer3... selected: "&DefCM.InspTrl)
Return 3
End Select
Else
Select BDmod.MB("Select Trailer"," Select The Trailer To Inspect",DefCM.DefTrlNum,DefCM.DefTrlNum2,"")
' i = Msgbox2( " Select The Trailer To Inspect","Select Trailer",DefCM.DefTrlNum, DefCM.DefTrlNum2, "",Null)
Case DialogResponse.POSITIVE
DefCM.InspTrl = DefCM.DefTrlNum
Log(" GOT a trailer11... selected: "&DefCM.InspTrl)
Return 1
Case DialogResponse.CANCEL
DefCM.InspTrl = DefCM.DefTrlNum2
Log(" GOT a trailer22... selected: "&DefCM.InspTrl)
Return 2
End Select
End If
End If
DefCM.InspTrl = DefCM.DefTrlNum
Log(" getting a trailer - the only... selected as final result: "&DefCM.InspTrl)
Return 1
End Sub
Last edited: