F Frank Cazabon Member Licensed User Longtime User Jul 10, 2014 #1 Hi, I am using one main activity which loads a main layout. On this layout I have a TabHost in which I load 4 tabs with a page layout on each, like this: Code: tbhMain.AddTab("Select Route","SelectRoute") tbhMain.AddTab("Load","Load") tbhMain.AddTab("Deliver","Deliver") tbhMain.AddTab("Upload","Upload" The Load layout has a panel on it called pnlLoad. I add a SearchView on it like this: Code: svwAWB.AddToParent(pnlLoad, 0, 0, 300dip, 300dip) This works successfully, but the items in the list are all displayed like this: [Ljava.lang.String;@41623980 [Ljava.lang.String;@41623a30 [Ljava.lang.String;@41623a98 and so on. This is how I create the list, which gets created successfully as I can see the AWB numbers in the debugger. the numbers are like 998056231. This is how I load the numbers into the SearchView: Code: If FirstTime Then Dim AWBs As List AWBs = DBUtils.ExecuteMemoryTable(SQLLite, "SELECT awb_number FROM RunSheetDetails", Null, 0) AWBIndex = svwAWB.SetItems(AWBs) Else svwAWB.SetIndex(AWBIndex) End If Can anyone see what I am doing wrong?
Hi, I am using one main activity which loads a main layout. On this layout I have a TabHost in which I load 4 tabs with a page layout on each, like this: Code: tbhMain.AddTab("Select Route","SelectRoute") tbhMain.AddTab("Load","Load") tbhMain.AddTab("Deliver","Deliver") tbhMain.AddTab("Upload","Upload" The Load layout has a panel on it called pnlLoad. I add a SearchView on it like this: Code: svwAWB.AddToParent(pnlLoad, 0, 0, 300dip, 300dip) This works successfully, but the items in the list are all displayed like this: [Ljava.lang.String;@41623980 [Ljava.lang.String;@41623a30 [Ljava.lang.String;@41623a98 and so on. This is how I create the list, which gets created successfully as I can see the AWB numbers in the debugger. the numbers are like 998056231. This is how I load the numbers into the SearchView: Code: If FirstTime Then Dim AWBs As List AWBs = DBUtils.ExecuteMemoryTable(SQLLite, "SELECT awb_number FROM RunSheetDetails", Null, 0) AWBIndex = svwAWB.SetItems(AWBs) Else svwAWB.SetIndex(AWBIndex) End If Can anyone see what I am doing wrong?
F Frank Cazabon Member Licensed User Longtime User Jul 10, 2014 #2 From the DBUtils comments: DBUtils.ExecuteMemoryTable() 'Executes the query and returns the result as a list of arrays. So I guess my question is: how to convert this list of arrays to a list of strings? Upvote 0
From the DBUtils comments: DBUtils.ExecuteMemoryTable() 'Executes the query and returns the result as a list of arrays. So I guess my question is: how to convert this list of arrays to a list of strings?
Erel B4X founder Staff member Licensed User Longtime User Jul 10, 2014 #3 Code: Dim List1 As List List1.Initialize For Each row() As String In AWBs List1.Add(row(0)) Next AWBIndex = svwAWB.SetItems(List1) Upvote 0
Code: Dim List1 As List List1.Initialize For Each row() As String In AWBs List1.Add(row(0)) Next AWBIndex = svwAWB.SetItems(List1)