The only way I've found to do this is to rewrite the whole list of choices,
trimming any extras off the end.

local function update_combobox_choices(combobox, choice_table, selected)
  local items = #combobox
  local choices = #choice_table
  for i, name in ipairs(choice_table) do
    combobox[i] = name
  end
  if choices < items then
    for j = items, choices + 1, -1 do
      combobox[j] = nil
    end
  end
  combobox.value = selected
end


Regards,

Bill

On Wed, May 3, 2017 at 2:07 PM, Holger Klemm <darkta...@multimedia4linux.de>
wrote:

> 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+unsubscribe@
> lists.darktable.org

___________________________________________________________________________
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org

Reply via email to