how can I iterate through a list widget (all items or all selected in there), which I implemented this way:
Code: Select all
ir = ir + 1; -- incremented
d = vlc.dialog("My new extension")
deleteListGUI = d:add_list(1,7,10,10)
deleteListGUI:add_value("string", ir)
-- how to iterate through deleteListGUI?
Code: Select all
-- remove selected items from delete-list
function removeFromDeleteList()
local selected = deleteListGUI:get_selection()
for name, value in pairs(selected) do
vlc.msg.dbg("name: " .. name .. " value: " .. value)
deleteListGUI:add_value("", name) -- overwrite, want to delete
d:update() -- but the overwritten item is already seen in the list and another empty item appends to the list
-- I want to delete these value's from deleteListGUI but keep the unselected items in this list
end
end
-- how looks the function to get all items in deleteListGUI?
function getAllItemsInList()
-- ???
end