Hello Erel,
Check this code carefully. Inputlist will not pop up when using -100 and -101 in the select case statement. Comment and uncomment to see what I am talking about. Only DATA2 shows the sub Menu Inputlist
Check this code carefully. Inputlist will not pop up when using -100 and -101 in the select case statement. Comment and uncomment to see what I am talking about. Only DATA2 shows the sub Menu Inputlist
B4X:
Sub Button2_Click
Dim Ret1 As Int
Dim blnTest As Boolean
blnTest = False
If blnTest = True Then
Else
Dim L2 As List: L2.Initialize
L2.Add("DATA1")
L2.Add("DATA2")
L2.Add("DATA3")
L2.Add("DATA4")
L2.Add("DATA5")
L2.Add("Other")
Dim Ret1, Ret2 As Int
Ret2 = InputList(L2, "SELECT FROM", -1)
If Ret2 = DialogResponse.CANCEL Then
Return
End If
L2.Clear
Select Case Ret2
'--------------------------------------------------------------------------------------------------
'1
'--------------------------------------------------------------------------------------------------
Case 1
L2.Add("1")
L2.Add("2")
L2.Add("3")
L2.Add("4")
L2.Add("5")
L2.Add("6")
Ret1 = InputList(L2, "TEST 1", -1)
If Ret1 = DialogResponse.CANCEL Then
Return
End If
Select Case Ret1
'it has something to do with -100 and -101
'remove -100 and -101
Case 0: Ret1 = -100
Case 1: Ret1 = -101
Case 2: Ret1 = 5
Case 3: Ret1 = 79
Case 4: Ret1 = 7
Case 5: Ret1 = 11
Case 6: Ret1 = 10
End Select
Select Case Ret1
Case 79
'it has something to do with -100 and -101
'remove -100 and -101
Case -100
Case -101
Case Else
Dim L3 As List: L3.Initialize
Select Case Ret1
Case 12, 13, 14, 16, 19, 23, 24, 76, 77, 78
L3.Add("Test"): L3.Add("TEST2"): L3.Add("TEST3")
Case Else
L3.Add("TEST"): L3.Add("TEST2"): L3.Add("TEST3"): L3.Add("TEST4")
End Select
Dim tmpFordSystem As Int
tmpFordSystem = InputList(L3, "TEST", -1)
If tmpFordSystem = DialogResponse.CANCEL Then
Return
Else
If tmpFordSystem = 0 Then
Else
End If
End If
End Select
'--------------------------------------------------------------------------------------------------
'2
'--------------------------------------------------------------------------------------------------
Case 2
L2.Add("DATA1")
L2.Add("DATA2")
L2.Add("DATA3")
L2.Add("DATA4")
L2.Add("DATA5")
Ret1 = InputList(L2, "TEST 2", -1)
If Ret1 = DialogResponse.CANCEL Then
Return
End If
Select Case Ret1
Case 0: Ret1 = -100
Case 1: Ret1 = -101
Case 2: Ret1 = 27
Case 3: Ret1 = 28
Case 4: Ret1 = 29
End Select
If Ret1 = -101 Then
End If
'--------------------------------------------------------------------------------------------------
'2
'--------------------------------------------------------------------------------------------------
Case 3
L2.Add("DATA1")
L2.Add("DATA2")
L2.Add("DATA3")
Ret1 = InputList(L2, "TEST 3", -1)
If Ret1 = DialogResponse.CANCEL Then
Return
End If
Select Case Ret1
Case 0: Ret1 = 2
Case 1: Ret1 = 4
Case 2: Ret1 = 3
End Select
'--------------------------------------------------------------------------------------------------
'3
'--------------------------------------------------------------------------------------------------
Case 4
L2.Add("DATA1")
L2.Add("DATA2")
L2.Add("DATA3")
Ret1 = InputList(L2, "TEST 4", -1)
If Ret1 = DialogResponse.CANCEL Then
Return
End If
Select Case Ret1
Case 0: Ret1 = 62
Case 1: Ret1 = 1
Case 2: Ret1 = 59
End Select
'--------------------------------------------------------------------------------------------------
'5
'--------------------------------------------------------------------------------------------------
Case 5
L2.Add("DATA1")
L2.Add("DATA2")
Ret1 = InputList(L2, "TEST 5", -1)
If Ret1 = DialogResponse.CANCEL Then
Return
End If
Select Case Ret1
Case 0: Ret1 = 74
Case 1: Ret1 = 73
End Select
'--------------------------------------------------------------------------------------------------
'6
'--------------------------------------------------------------------------------------------------
Case 6
Ret1 = 0
End Select
End If
End Sub
Last edited: