Hi All, I'm working on an iOS app and I'm playing around with the TableView library, for some reason when adding an item to the tableview it doesn't show up, below is my code:
I have confirmed that there should be two items at least added to the tableView but for some reason they are not being added, when I step through the code I can see inside the for loop that the two items are being added with lvFileList.AddSingleLine.
Any ideas?
Thanks
B4X:
Sub RefreshList
lstLocalFiles.Initialize
lstFNames.Initialize
Dim list_files As List
Dim sFolder As String
sFolder = Starter.sObserverPath
list_files.Initialize
list_files = File.ListFiles(sFolder)
For i = 0 To list_files.Size -1
If File.IsDirectory(sFolder, list_files.Get(i)) = False Then
Dim sFName, sTmp As String
sFName = list_files.Get(i)
sTmp = sf.Right(sFName,4)
sTmp = sf.Lower(sTmp)
If sTmp <> ".map" Then
DateTime.DateFormat= "MM/dd/yyyy"
Dim d As String
d = DateTime.Date(File.LastModified(Starter.sObserverPath, sFName))
lstFNames.Add(sFName)
sFName = sFName & " (" & d & ")"
lstLocalFiles.Add(sFName)
End If
End If
Next
lstFNames.SortCaseInsensitive(True)
lstLocalFiles.SortCaseInsensitive(True)
lvFileList.Clear
For i = 0 To lstLocalFiles.Size - 1
Log("adding file: " & lstLocalFiles.Get(i))
lvFileList.AddSingleLine(lstLocalFiles.Get(i)).Update
Next
lvFileList.ReloadAll
End Sub
I have confirmed that there should be two items at least added to the tableView but for some reason they are not being added, when I step through the code I can see inside the for loop that the two items are being added with lvFileList.AddSingleLine.
Any ideas?
Thanks