Release 2016.11.18.00

 
#1

Changes:

- 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).

  Get EZ-Builder for Windows

#2

DJ,

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.

#3

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 Grin

User-inserted image

#4

DJ,

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? Smile

#5

@jmp23834

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

Code:


#keep the array updated with the combobox's options
DefineArray($names, 4)
$names[0]="Donald"
$names[1]="John"
$names[2]="Yoda"
$names[3]="Jane"

#also update the Array size to match the number of combobox's options
DefineArray($titles, 4)
$titles[0]="Mr"
$titles[1]="Mr"
$titles[2]="Master"
$titles[3]="Mrs"

:loop
WaitForChange($SelectedIndex)
SayEzb("Hello " + $titles[$SelectedIndex] + " " + $names[$SelectedIndex])
Goto(loop)

#6

ptp,

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

JP