Hi!
I am new to Tcl/Tk and I need some help .
My procedure is:
The idea is to take the number of the rectangle when you click on one. But I get an error:
ERROR: can't read "vehicleNum": no such variable
command bound to event:
"upvar 1 $vehicleNum v "
Any ideas ?
Thank you in advance.
I am new to Tcl/Tk and I need some help .
My procedure is:
Code:
proc changeText {data} {
upvar #0 $data v
set w .f.f0.u
set vehicleNum $v(Tag)
# changing the text
$w bind $v(Tag) <Button-1> {
upvar 1 $vehicleNum v
set num $v
set QuTxt(NumberOfCarsBehind) $num
}
}
The idea is to take the number of the rectangle when you click on one. But I get an error:
ERROR: can't read "vehicleNum": no such variable
command bound to event:
"upvar 1 $vehicleNum v "
Any ideas ?
Thank you in advance.