HISE icon indicating copy to clipboard operation
HISE copied to clipboard

Add ComboBox.clear() API.

Open psobot opened this issue 6 years ago • 1 comments

Not sure if I'm doing this completely correctly (as I couldn't find this resulting method in auto-generated API docs within the HISE interface) but here's a .clear method on ScriptComboBox.

Why is this useful? I found myself in a situation where I dynamically added elements to a ComboBox from within a script, but found that HISE would continue appending elements every time I compiled the script, resulting in a hard-coded list of hundreds of elements. With .clear(), scripts can now ensure that they're starting with a completely blank slate before populating a ComboBox.

psobot avatar Jan 14 '18 20:01 psobot

You can also just call ComboBox.set("items", ""); in Javascript which clears the list too, but I agree a method like this is convenient.

christoph-hart avatar Jan 14 '18 20:01 christoph-hart