epiCode Active Member Licensed User Jul 2, 2021 #1 B4X: Copy memtable is list storing array at location Index Dim StrArr() As List = memtable.get(Index) lbheading.Text=StrArr(vheading) <-- causes java.lang.RuntimeException: Method: Get not found in: java.lang.Integer vheading is integer with value 5 however watch expression StrArr(vheading) gives correct string in debug What am I doing wrong? how else can we set label.text to item from array in list ?
B4X: Copy memtable is list storing array at location Index Dim StrArr() As List = memtable.get(Index) lbheading.Text=StrArr(vheading) <-- causes java.lang.RuntimeException: Method: Get not found in: java.lang.Integer vheading is integer with value 5 however watch expression StrArr(vheading) gives correct string in debug What am I doing wrong? how else can we set label.text to item from array in list ?
KMatle Expert Licensed User Longtime User Jul 2, 2021 #2 StrArr ist a list (not a simple array). So you need to use the get method to get a value from it: B4X: Copy lbheading.Text=StrArr.get(vheading) Upvote 0
StrArr ist a list (not a simple array). So you need to use the get method to get a value from it: B4X: Copy lbheading.Text=StrArr.get(vheading)
epiCode Active Member Licensed User Jul 2, 2021 #3 KMatle said: StrArr ist a list (not a simple array). So you need to use the get method to get a value from it: B4X: Copy lbheading.Text=StrArr.get(vheading) Click to expand... there is no get method available. it shows only .length available Upvote 0
KMatle said: StrArr ist a list (not a simple array). So you need to use the get method to get a value from it: B4X: Copy lbheading.Text=StrArr.get(vheading) Click to expand... there is no get method available. it shows only .length available
mc73 Well-Known Member Licensed User Longtime User Jul 3, 2021 #5 Code: Copy Dim StrArr() As string = memtable.get(Index) Upvote 0
epiCode Active Member Licensed User Jul 4, 2021 #6 mc73 said: Code: Copy Dim StrArr() As string = memtable.get(Index) Click to expand... Worked like a charm !!! Thanks Upvote 0
mc73 said: Code: Copy Dim StrArr() As string = memtable.get(Index) Click to expand... Worked like a charm !!! Thanks