This one is odd (or, I just don't understand).
I've built a small 2 column (default) tableview. I then add 3 items to it from an array. That array of elements was created from a Regex split. If I add the items directly from the split, All is good BUT if I move the values of those items to another matching string array, only the last value gets added to all the rows in the Tableview.
I have my get around but I'm trying to understand if this is a BUG or a misunderstanding on my part.
I've included the .zip of the application.
Anyone that can help me understand this would be greatly appreciated.
Gary Miyakawa
I've built a small 2 column (default) tableview. I then add 3 items to it from an array. That array of elements was created from a Regex split. If I add the items directly from the split, All is good BUT if I move the values of those items to another matching string array, only the last value gets added to all the rows in the Tableview.
B4X:
TableView1.SetColumns(Array As String("Site Name", "IP Address"))
line = "HDX Desk"", ""10.1.2.86:24""" & CRLF & "Group Series"", ""10.1.2.50:24""" & CRLF & "Callback 157"", ""171.1.2.157:24""" & CRLF
lines = Regex.Split(CRLF, line) 'Split the lines based on CRLF
For Each item In lines
items = Regex.Split(",", item) 'Split the line based on Comma
test(0) = items(0) 'move value from one array to another
Log("Added: " & test(0)) 'Show it's value in the log
test(1) = items(1)
Log("Added: " & test(1))
TableView1.Items.Add(test) 'add the 'test' string array to the tableview
Next
I have my get around but I'm trying to understand if this is a BUG or a misunderstanding on my part.
I've included the .zip of the application.
Anyone that can help me understand this would be greatly appreciated.
Gary Miyakawa