CerberusC
02-27-2009, 11:24 PM
Hi all.
I want to do a loop that is controlled by multiple variables, Example:
rollout vari "variable test" width:150 height:400
(
spinner var_a "Variable A" range:[0,10,0] type:#integer pos:[60,10] width:60
spinner var_b "Variable B" range:[0,10,0] type:#integer pos:[60,30] width:60
button tess "Test" pos:[5,50] width:100
on var_a changed val do (
print var_a.value as String
)
on var_b changed val do (
print var_b.value as String
)
on tess pressed do (
)
)
varfloater = newRolloutFloater "Variable Test" 150 120
addRollout vari varfloater
I want that when i press the button i can saw the result of the addition of the two values of the spinners until i arrive to the maximun values of the two spinners, then print a message
I mean if i have in an spinner a value of 2 and in the other a value of 3 the results in the output must be:
0+0 =0
1+1 =2
2+2 =4
2+3 =5
and then the printed message: "we have arrived"
0
2
4
5
"we have arrived"
Thanks
I want to do a loop that is controlled by multiple variables, Example:
rollout vari "variable test" width:150 height:400
(
spinner var_a "Variable A" range:[0,10,0] type:#integer pos:[60,10] width:60
spinner var_b "Variable B" range:[0,10,0] type:#integer pos:[60,30] width:60
button tess "Test" pos:[5,50] width:100
on var_a changed val do (
print var_a.value as String
)
on var_b changed val do (
print var_b.value as String
)
on tess pressed do (
)
)
varfloater = newRolloutFloater "Variable Test" 150 120
addRollout vari varfloater
I want that when i press the button i can saw the result of the addition of the two values of the spinners until i arrive to the maximun values of the two spinners, then print a message
I mean if i have in an spinner a value of 2 and in the other a value of 3 the results in the output must be:
0+0 =0
1+1 =2
2+2 =4
2+3 =5
and then the printed message: "we have arrived"
0
2
4
5
"we have arrived"
Thanks
