Hello,
How to reference a variable if its name includes substitution ?
foreach item {aaa bbb ccc} {
checkbutton $frm_FRAME1.chkbt_$item \
-variable var_$item -text $item \
-command "puts $var_$item"
pack $frm_FRAME.chkbt_$item -anchor w
}
Execution of this code generate error:
can't read "var_": no such variable
Thanks in advance,
Pavel
How to reference a variable if its name includes substitution ?
foreach item {aaa bbb ccc} {
checkbutton $frm_FRAME1.chkbt_$item \
-variable var_$item -text $item \
-command "puts $var_$item"
pack $frm_FRAME.chkbt_$item -anchor w
}
Execution of this code generate error:
can't read "var_": no such variable
Thanks in advance,
Pavel