Hi there! I am building a UI with widgets in a container to serve as a control panel in perform mode. I’d like the end user to be able to make two selections - the display source for a screengrab TOP, and the Drive/Device for an Audio Device Out CHOP.
So, essentially I want to know how to bind a menu parameter like op(“myscreengrab”).par.source or op(“myaudioout”).par.device to one of the drop down menu widgets like dropDownMenu from the Ui/Basic Widgets palette.
Is there a simple way? Right now I’ve put a chopexec looking at the out_menu0Index inside dropDownMenu, which sets the parameter when the UI dropdown is changed. I’m using the “Command On Click” field of the dropDownMenu Widget to run a script to populate the menuName and menuLabels of the ui DropDownMenu with all the options in the menu params in the screengrab or audio chop. I do this since, in either case, there could be new window sources to choose from or new audio devices, so I want to refresh the list each time the user tries to choose. But, I’m noticing this script doesn’t seem to run before the menu is displayed, so you have to click the menu twice to truly get a refreshed list. Feels unreliable.
Is there a simpler (or more reliable version of my current complicated solution) to make a binding kind of bidirectional link between a menu parameter and a ui dropDownMenu?