dropdownlist control how to change variables

Good day.

I want to change variables, use dropdownlist control

_______________________________________________________________

a=undefined
b=undefined

rollout ddl_test "Drop-Down List"

(

dropdownlist scale_dd "Scale" items:#("1/2", "1/4", "1/8", "1/16")

on scale_dd selected i do(
case of(
(i=1): (a=5
b=3)
(i=2): (a=1
b=7)
(i=3): (a=0
b=4)
(i=4): (a=9
b=23)
)

)

)

createDialog ddl_test
__________________________________________________________________

Where I make error ???

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Any's picture

Thank you for attention....

Thank you for attention....

barigazy's picture

...

Try this

rollout ddl_test "Drop-Down List"
(
	local a, b
	dropdownlist scale_dd "Scale" items:#("1/2", "1/4", "1/8", "1/16")
	on scale_dd selected i do
	(
		case i of
		(
			1: (a=5 ; b=3)
			2: (a=1 ; b=7)
			3: (a=0 ; b=4)
			4: (a=9 ; b=23)
		)
		format "a = % ; b = %\n" a b
	)
)
createDialog ddl_test

barigazy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.