How to show/hide a table when a certain waveform type is selected?



  • I'm trying to have a table on top of a floating tile so that the custom waveform type can be used as a draggable table when the custom waveform type is selected.

    If possible, I'd like the table to become invisible when any other waveform other than custom is selected.

    This is how I imagined it working, but it's not right.

    Any ideas what I've messed up in the code?

    const var FloatingTile1 = Content.getComponent("FloatingTile1");
    const var Table1 = Content.getComponent("Table1");
    const var ComboBox1 = Content.getComponent("ComboBox1");
    
    
    inline function onComboBox1Control(component, value)
    {
        if (value == custom)
        {
            Table1.showControl(true);
        }
        else
        {
            Table1.showControl(false);
        }
    };
    
    Content.getComponent("ComboBox1").setControlCallback(onComboBox1Control);
    

    There's an example snippet here to show you what I mean...

    HiseSnippet 1821.3oc6Y07babaEGKofqEUjiSqamja6noGjl5ngT9iXGOdxZQI5noRlzlzIcldvEZWPRTsKvlcwJKkDOsG6s9mT60N8Rmo25o1+C58dH8Afk6hUhVhgQoU1S1CZDde.768vCu2Cf8RD9zzTQBxYwAGGSQNuCt+wb431iILNZmsPN2GOflJc+TV.0UR1Oj59xwTtaJMj5KY7QtoiIwzTWgbLMwUNlvc8yRkhHzlGGSRSoAHGm5OVMcNKt.R+8u+jMIgDtOsjDB8YBlOcWVDSVRsm2ujEF1gDPGvhrj91d63K3sEghL.50wMQwD+CHinOgnDqFF4bksCXRQReIQRSQNKroH339iEujaj+yXoLvXTCZg5CSjgbGQXfBwp+G0dLKLn2DWTJB4f6U5vpabX2.uGKfUPuzwccMC2RMr8GN0NK30ZNgmiE7Vv.u2C22OgEKK4nv1R3c3RZxPBrEXCKirnZGVC2V.RvkqGQNf1IAFTnwp2sYya5dmlMW6AK2X4FvFADebHIwsSnfnBIFvBosben6joXDU1VDEK3vfUWohTqr1CrlfAp3qWulF1UUAXuuXSwQudsJjPoXiFLdHiScGlwgvWA2UEFkKfR+DQ3p9ST9lvRDlQWqwW0vE9XCcWUSv8gOLOHeMMCCa0mAhqmB6jSlMYBLCOPKwqz+kFlROe0FR.wJz6U.zOWya8TEGs5sIgg6CGIV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IIIILnwNUq3VK9epvQeJNOmyREbgFJOJRjwk1Y4y4tEUlwq.8bF8iSnjJIvUnuOEfZfdJSqrWUu5dEd1xLVsSSK4Om5k+n+O7xUW7GH9t2oc8YCtyVKhv8YXQwgzs4GRCgqBmmbbK5PRVnrfpMH2CBTL8TZGA8LpLgMZDMwF5S0ddjTR7Ovt4gmQCoPeBkj94d6BWLhjTsCyuUthVytq3r1tderAttpiutucbAo5uEcAoKdW26fMoGeCnIFnHlNg8kDndCCTWR+DD5xqZT9SKdaK2GS4zjSeglp0V+ayZs03Yt1ZWeI.gAIDdZrHk1xdlOAuMr4YhDlHt2+5ez1yPphTSdwEqo8pdSHtgMwdDdk0FFWYl1iYUL+e9IlVBLke6l5CFqx2U49UYgozOW81XsrUrj7F1jOYA64O8I9GpE+CI0eCJotJF7nKAkuelHS8aCrGAZVR8ZvOIKpOjkxmBPkyogptncpo572LtoZrBP8o7.8.0i+myrkZrSNyVSX9VyZDQ7SDuv27i9nR5bUMEv2x0+D4Kh2SM1s324AiatdSTDjr4E99pHvOD1CltNaLG5bq4PmaOG5bm4Pm6NG57QygN26L0Qkm+QYRQj4LFPn21lGnyo3sAcpi9uvklYuX
    


  • Try Console.print(value); and all will be revealed. Then go look at the docs for the combobox. And you can't have parameter ID and a control callback. 😉



  • @d-healey said in How to show/hide a table when a certain waveform type is selected?:

    And you can't have parameter ID and a control callback.

    Damn, 3 times now I've forgotten that 🤣

    Ok, I'll fix that bit first and then have a look...



  • @d-healey Looks like

    if (value == 6)
    

    was the answer! Thanks mate. All working now.

    I even went one step further and now have the floating tile made invisible when 'custom' is selected. I'm proud of that small win there 🙂


Log in to reply
 

8
Online

556
Users

2.1k
Topics

16.6k
Posts