// userChangeListener is called only when user changes selected item // (not when var is changed) static > A bindComboBoxToVar_withUserChangeListener(A cb, IVarWithNotify var, Runnable userChangeListener) { new BoolVar inVarChange; if (var != null) { bindListenerToComponent(cb, var, -> { temp tempSetBoolVar(inVarChange, true); selectItem(cb, var!); }); onChange(cb, (Runnable) () -> { var.set(getSelected(cb)); if (!inVarChange!) pcallF(userChangeListener); }); } ret cb; }