RadioGroup Default



  • What would be the best way to have a button in a radio group be active when the script is loaded? Currently if a button is not part of radioGroup it will remember its state each time the script loads but those that are part of a radioGroup default to off rather than recalling their previous state.

    <?xml version="1.0" encoding="UTF-8"?>
    
    <Processor Type="ScriptProcessor" ID="radioGroupTest" Bypassed="0" Script="const var button1 = Content.addButton(&quot;button1&quot;, 0, 0);&#13;&#10;button1.set(&quot;radioGroup&quot;, 1);&#13;&#10;&#13;&#10;const var button2 = Content.addButton(&quot;button2&quot;, 150, 0);&#13;&#10;button2.set(&quot;radioGroup&quot;, 1);&#13;&#10;&#13;&#10;const var button3 = Content.addButton(&quot;button3&quot;, 300, 0);&#13;&#10;button3.set(&quot;radioGroup&quot;, 1);&#13;&#10;&#13;&#10;button1.setValue(1);function onNoteOn()&#10;{&#10;&#9;&#10;}&#10;function onNoteOff()&#10;{&#10;&#9;&#10;}&#10;function onController()&#10;{&#10;&#9;&#10;}&#10;function onTimer()&#10;{&#10;&#9;&#10;}&#10;function onControl(number, value)&#10;{&#10;&#9;&#10;}&#10;">
      <EditorStates BodyShown="1" Visible="1" Solo="0" contentShown="1" onInitOpen="1"
                    onNoteOnOpen="0" onNoteOffOpen="0" onControllerOpen="0" onTimerOpen="0"
                    onControlOpen="0"/>
      <ChildProcessors/>
      <Content>
        <Control type="ScriptButton" id="button1" value="0"/>
        <Control type="ScriptButton" id="button2" value="0"/>
        <Control type="ScriptButton" id="button3" value="0"/>
      </Content>
    </Processor>
    


  • Yes, that's strange. I'll check it out.


 

1
Online

353
Users

1.1k
Topics

7.6k
Posts