Enable/Disable Combo Box Strange Behaviour
-
Hi guys!
Working on an instrument that needs a lot of enable/disable bands of Equalisers i came to a rather strange behaviour using comboboxes for changing band types and buttons for enabling/disabling bands.Everything works as expected but at some point i need to enable/disable combo boxes also.
So when i have a button to "on" state it enables the corresponding combobox and the combobox can change the band type.
When i have the button to "off" state it disables the combobox and the EQ Band (Works as expected till now)The strange thing is that if i set the button again to "on" state it enables both but the combobox stays enabled only for one value change...after that it acts like disabled and does nothing...
If i repeat the procedure "off" and then "on" again it acts the same way like before(combobox enabled for one value change and then dead)Finally if i hit F5 and compile everything works as expected on the combobox until i press the button to "off" state again...
I made a simple version of this problem using one Combo Box one Button and one Parametric Eq
I use this code
Content.makeFrontInterface(600, 500); const var ParametriqEQ1 = Synth.getEffect("Parametriq EQ1"); const var ComboBox1 = Content.getComponent("ComboBox1"); ComboBox1.set("items", "HiCut\nLowCut\nLowShelf\nHiShelf\nBell"); ComboBox1.setControlCallback(SetBandType); //The Function to change Eq BandType inline function SetBandType(component, value) { ParametriqEQ1.setAttribute(4, ComboBox1.getValue()-1); }; const var Button1 = Content.getComponent("Button1"); Button1.setControlCallback(EnableCombo); //The Function to Enable/Disable the Combobox inline function EnableCombo(component, value) { ComboBox1.set("enabled", Button1.getValue()); };
Here is the snippet
HiseSnippet 1068.3ocuV0taaaCEkx1ZXVadHEnO.BF6Gx.oIxsosCnXnt9qUi0j5N6FreTrVZI5XhPQ5HQkFihBzG08Hz2fsKojrjcrCLLPqCPr48Cxy8PxykCCEdjnHQHxn53EyIHie1bzBtbVmYXJGMnKx3mL6HBlHFShjn1KliihH9HCix+gJ.ipUP5Oe84swLL2ijaBgNWP8HuhFPk4VG15OoLVerOYLMnPzmzZfmf2QvDw.XJa5hli8tDeA4LrJrRlHienmOUJBGIwRRDxnRag+hQyDejmD+4zH5DFQMnIZDLQIl6KX9JDqrh5Lix7GlUzQHXVFlSAkSnf6adJ0mtzdNUbf1gcdFE4CiR2E7ZVDdt6N7LJ.uJIv6dli7Bo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Has Anyone faced the same problem? Any help would be extremely appreciated!
-
@DimitrisSP That is effectively very strange! Seems like a bug... @Christoph-Hart ?
-
@ustk Hi my friend!
Did you try it to your end?
Is it working as expected to you?Here is the same behaviour with Hise Master and Hise ScriptNode!
-
@DimitrisSP I tried and made my own snippet, giving the same bad behavior so it's definitely a bug...
-
@ustk Thanks bro...So it seems that it is not related to my code...Let's hope that @Christoph-Hart will come with a solution on that!