HISE Logo Forum
    • Categories
    • Register
    • Login

    Enable/Disable Combo Box Strange Behaviour

    Scheduled Pinned Locked Moved Scripting
    enabledisablecombobox
    5 Posts 2 Posters 381 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DimitrisSPD
      DimitrisSP
      last edited by

      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...

      ComboTest.gif

      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.oIxsosCnXnt9qUi0j5N6FreTrVZI5XhPQ5HQkFihBzG08Hz2fsKojrjcrCLLPqCPr48Cxy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oL3WnzpsTFZlZ3eea3+nM7vUeeE2+Qqa3jbCGzxn7pkd4cSLZCL+eIhkT9EmhgxQcwAJfQv6x7H.wy4DltNJotKkL1UMVAhQDccYZ7evmTmMyJZkylYN+trFAXuPw68Rj5T6i+n1BT2b8qJqZdpZr8RENSS2ibQAvq7dumm5z0CfiCaNmGtG47n8HmS1ibd7djyS1ibd5djyucm4ndf8KhkhfDkGvvvd5NMFFIO3PegB8+fE.5Gz
      

      And here is the small project if someone wants to test it
      ComboTest.zip

      Has Anyone faced the same problem? Any help would be extremely appreciated!

      ustkU 1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @DimitrisSP
        last edited by

        @DimitrisSP That is effectively very strange! Seems like a bug... @Christoph-Hart ?

        Can't help pressing F5 in the forum...

        DimitrisSPD 1 Reply Last reply Reply Quote 0
        • DimitrisSPD
          DimitrisSP @ustk
          last edited by

          @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!

          ustkU 1 Reply Last reply Reply Quote 0
          • ustkU
            ustk @DimitrisSP
            last edited by ustk

            @DimitrisSP I tried and made my own snippet, giving the same bad behavior so it's definitely a bug...

            Can't help pressing F5 in the forum...

            DimitrisSPD 1 Reply Last reply Reply Quote 1
            • DimitrisSPD
              DimitrisSP @ustk
              last edited by

              @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!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              62

              Online

              1.7k

              Users

              11.7k

              Topics

              102.1k

              Posts