LWGShane Well-Known Member Licensed User Longtime User Jan 6, 2016 #1 I'm trying to use ExecuteList from DBUtils, but keep getting this error: Code: java.lang.ClassCastException: javafx.scene.control.ListView cannot be cast to java.util.List This is my code: Code: Sub ShowRecents Dim Recents As SQL Recents.InitializeSQLite(DBLocal, "recent-projs.db", False) Dim QueryRecents As String = "SELECT Name FROM Recents" DBUtils.ExecuteList(Recents, QueryRecents, Null, 0, RecentProjectsList) End Sub (I'm working on a B4X "Launcher". Have everything working except the recent projects code.) The Database is attached. Attachments recent-projs.zip recent-projs.zip 511 bytes · Views: 316
I'm trying to use ExecuteList from DBUtils, but keep getting this error: Code: java.lang.ClassCastException: javafx.scene.control.ListView cannot be cast to java.util.List This is my code: Code: Sub ShowRecents Dim Recents As SQL Recents.InitializeSQLite(DBLocal, "recent-projs.db", False) Dim QueryRecents As String = "SELECT Name FROM Recents" DBUtils.ExecuteList(Recents, QueryRecents, Null, 0, RecentProjectsList) End Sub (I'm working on a B4X "Launcher". Have everything working except the recent projects code.) The Database is attached.
R Roycefer Well-Known Member Licensed User Longtime User Jan 7, 2016 #2 The error message tells you what the problem is. You're trying to use a ListView somewhere that requires a List. My guess is that you should be using ListView.Items instead of the ListView. Upvote 0
The error message tells you what the problem is. You're trying to use a ListView somewhere that requires a List. My guess is that you should be using ListView.Items instead of the ListView.
LWGShane Well-Known Member Licensed User Longtime User Jan 7, 2016 #3 Roycefer said: The error message tells you what the problem is. You're trying to use a ListView somewhere that requires a List. My guess is that you should be using ListView.Items instead of the ListView. Click to expand... I didn't even think that List didn't mean "ListView". Thanks! Upvote 0
Roycefer said: The error message tells you what the problem is. You're trying to use a ListView somewhere that requires a List. My guess is that you should be using ListView.Items instead of the ListView. Click to expand... I didn't even think that List didn't mean "ListView". Thanks!