Hi All
The code below casts an exception at the statement marked
B4X:
Dim AL As List
AL.Initialize
AL.AddAll (Array As String("a", "b", "c","d","e","f","g","h","i","j","k","l","m"))
AL.AddAll (Array As String("q", "r", "s","t","u","v","w","x","y","z","1","2","3"))
For i = 0 To AL.Size-1
Dim Row() As Object
Row = AL.Get(i) 'throws exception
TableViewAssetList.Items.Add(Row)
Next
Dim AL As List
AL.Initialize
Dim Row() As Object = Array ("a", "b", "c","d","e","f","g","h","i","j","k","l","m")
AL.Add(Row)
Dim Row() As Object = Array ("q", "r", "s","t","u","v","w","x","y","z","1","2","3")
AL.Add(Row)
Dim Row() As Object = Array ("A", "B", "C","D","E","F","G","H","I","J","K","L","M")
AL.Add(Row)
For i = 0 To AL.Size-1
TableViewAssetList.Items.Add(AL.Get(i))
Next
TableViewAssetList.Items.AddAll(Array As String("a", "b", "c","d","e","f","g","h","i","j","k","l","m"))
TableViewAssetList.Items.AddAll(Array As String("q", "r", "s","t","u","v","w","x","y","z","1","2","3"))
TableViewAssetList.Items.AddAll(Array As String("A", "B", "C","D","E","F","G","H","I","J","K","L","M"))
Unless you need to build the list (this looks like test data in your post), if so you can just point the tableview at it after you build the list.
B4X:
TableViewAssetList.Items = AL
the plus side is any changes you make to the list will be reflected in the Tableview - downside if you clear the list the Tableview will be empty.
Daestrum, thats an excellent idea, I will update my code with that:
B4X:
TableViewAssetList.Items = AL
By the way, yes, the data is just for tests. The final data will have to be individually calculated items, but as long as the result is strings, this will work okay. Thanks to all of you.