Hello,
I want to remove in my Lua script entries from a combobox during runtime.
Removes entries by setting them to nil does not work! What am I doing wrong?
See attachement
Holger
___________________________________________________________________________
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org
--[[
darktable is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
darktable is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with darktable. If not, see <http://www.gnu.org/licenses/>.
]]
local dt = require "darktable"
local gettext = dt.gettext
dt.configuration.check_version(...,{4,0,0})
test_combobox = dt.new_widget("combobox")
{
label = 'test combobox',
tooltip ='',
value = 1,
editable=true,
"1","2","3","4","5",
reset_callback = function(self_reset)
self_reset.value = 1
end
}
add_button = dt.new_widget("button")
{
label = 'change combobox',
clicked_callback = function (xxx)
test_combobox{nil}
test_combobox{"XX","YY",nil,nil,nil,}
dt.print("combobox changed")
end
}
local import_widget = dt.new_widget("box") {
test_combobox,
add_button,
}
dt.register_lib("test", "test", true, true, {[dt.gui.views.lighttable] = {"DT_UI_CONTAINER_PANEL_LEFT_CENTER", 900}}, import_widget, nil, nil)