Hi,
I'm trying to get a button to do something, with a binding command. In order to get the right action, i'm using an array (2D). With a label just before the button i'm getting the right value of the array, but in the binding, the value (or the first dimension of the array) seems to have disappeared. Here's the piece of code i have trouble with:
Even in the puts command i get no value for the "i" variable, although the label shows the right value, so the "i" variable seems to vanish somehow.
Thanks for your help in advance,
Egal
I'm trying to get a button to do something, with a binding command. In order to get the right action, i'm using an array (2D). With a label just before the button i'm getting the right value of the array, but in the binding, the value (or the first dimension of the array) seems to have disappeared. Here's the piece of code i have trouble with:
Code:
label .waitpop.fr1.lab3 -text "Executing $arraystart($i,$k). \n Press OK to continue"
button .waitpop.fr1.but3 -text OK
pack .waitpop.fr1.lab3 -side top
pack .waitpop.fr1.but3 -side bottom
bind .waitpop.fr1.but3 <ButtonRelease-1> {
puts "i ist $i und k ist $k"
source $arraystart($i,$k)
incr k
destroy .waitpop
}
Even in the puts command i get no value for the "i" variable, although the label shows the right value, so the "i" variable seems to vanish somehow.
Thanks for your help in advance,
Egal