Release 2016.11.18.00

Download and install the latest ARC robot programming software to experience these updates.

Download ARC
Software Information

- mobile interface builder has a new control: Combobox (which is a drop down selection picker that sets a variable and executes a script). Ensure you update respective mobile app (iOS/Android).

I see where the combobox sets the $SelectedIndex. Is there also a variable that contains the value of what was selected as text? I have an If/Then/Else to check the index but as the list gets longer it would be helpful if there was a variable like $SelectedValue.
Hi Jmp! There's a variable which stores the index of the selected combobox option. An IF condition can be used to determine which option was selected. Here's an example of an IF condition checking which of 4 options were selected using blockly. Of course, if you're familiar with programming, EZ-Script syntax can be used as well. However, we recommend starting with Blockly - even I use it:D

User-inserted image

Thanks for the reply. That if statement is basically what I have now. What I was hopping for would be something like a $SelectedValue variable so I could just say:

SayEZB "$SelectedValue".

Maybe in a futre release? :)

If you use arrays you can minimize the script code and the repetition.


#keep the array updated with the combobox's options
DefineArray($names, 4)

#also update the Array size to match the number of combobox's options
DefineArray($titles, 4)

SayEzb("Hello " + $titles[$SelectedIndex] + " " + $names[$SelectedIndex])

Thanks, this is a good idea. I will give it a try tomorrow.