When filling a ui list object (ui module), the last entries are always displayed - see screenshot [Login to see the link].
This means that the user would have to scroll to the top of a list. I have not found a way to automatically jump to the top of the list.
I use the following code:
self.items = sqlcommand.getAllTables(database)
function sqlcommand.getAllTables(source)
assert(isDatabase(source), ERRORMESSAGE.notdatabase .. "source")
local allNames = {}
for currentTable in source:query("SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%' ORDER BY name;") do
table.insert(allNames, currentTable.name)
end
return allNames
end
Do you have any idee, what I'm doing wrong? With the combobox it works fine.