One switch to change dropdown's values

Una pregunta mas...

Trying to replace two dropdowns by a switch and 1 dropdown...
drop

I was able to find my way to this (script in the switch editor):

if(value == 1) set("dropdown_values",[70,71])
else if(value == 2) set("dropdown_values",[80,81])

where dropdown_values is a variable widget.

That works, but now, i'm strugling to add labels (or "keys", isn't it ?) for those values... Just "a", "b"... Being a noob to OSC's world, I tried a lot of things, such as ["a:",70, "b:",71], or [{"a":70},{"b":71}] and a few others but never got it...

Here again i just feel loooooooost....

So, again a huge "thank you" for helping me in that tremendous quest...

This will do

{"a": 70, "b": 71}

Thank you Jean-Emmanuel.
Next step, when i select a or b, dropdown displays the values. I'd like it to display keys.
How to do this ?

Thank you

To myself : found...

Properties > Label > %key

That's it

:slight_smile:

1 Like