The point is that I got the value I needed. I'm not modifying myvar I only interogate it...
I'm new to tcl so I'm learning as I program.
Anyway it's good to know..
Thanks
OK, thanks.. it's a good ideea...
Meantime i found "upvar" command which does exactly what I need: upload in a var the value of another.
So now I have something like this:
for {set i 0} {$i<$nck} {incr i} {
set ivck [$tfl.ck_$i cget -variable]
upvar $ivck myvar...
I have many checkboxes so I create them in a for statement:
set nck 0
foreach lf $lfiles {
checkbutton $tfl.ck_$nck -text $lf -variable vck_$nck
$tfl window create end -window $tfl.ck_$nck -align top
$tfl insert end \n
set nck [incr nck]
}
where tfl is a text...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.