For some really strange reason when I run this code the ListView doesn't get filled... The Log output show the entries no problem but the listview is blank.
If I remove this
Then as you'd expect I get an endlessly filled looping list.
But with it in place the code does exactly what I expect it to but the listview does not get filled.
If I remove this
B4X:
If ListView_Runs.size > 0 Then
For i = 0 To ListView_Runs.size - 1
If ListView_Runs.GetItem(i) = Parser2(0) & "s ," & Parser2(1) Then
Entry_Exists = True '<<<<<<<<
End If
Next
End If
Then as you'd expect I get an endlessly filled looping list.
But with it in place the code does exactly what I expect it to but the listview does not get filled.
B4X:
Sub Read_Text ' And compile the list based
Try
Dim Entry_Exists As Boolean
Dim Text As String = File.ReadString(FilePath, DateTime.Date(DateTime.Now) & ".txt")
If Text.Length > 15 Then
Dim Parser() As String
Dim Parser2() As String
Parser = Regex.Split("/", Text)
For i = 1 To Parser.Length
Parser2 = Regex.Split(",", Parser(i))
Entry_Exists = False
If ListView_Runs.size > 0 Then
For i = 0 To ListView_Runs.size - 1
If ListView_Runs.GetItem(i) = Parser2(0) & "s ," & Parser2(1) Then
Entry_Exists = True
End If
Next
End If
If Parser2(0) <> "9.999" Then
If Entry_Exists = False Then
ListView_Runs.AddSingleLine(Parser2(0) & "s ," & Parser2(1)) ' But No listview entries??
Log(Parser2(0) & "s ," & Parser2(1)) ' <<<<<<<<< See this below
End If
End If
Next
End If
Catch ex As Exception
Log(ex)
End Try
End Sub