static new ThreadLocal bindComboBoxToLiveValue_debug; static A bindComboBoxToLiveValue(final A cb, IVarWithNotify lv) { bool debug = isTrue(bindComboBoxToLiveValue_debug!); bindLiveValueListenerToComponent(cb, lv, r { selectItem(cb, lv!) }); onChange(cb, r { S s = getText(cb); // also works on editable combo boxes if (debug) print("ComboBox: " + s); lv.set(s); }); ret cb; }