Bonjour,
Comment référencer une variable si son nom contient deja une variable ?
L'exécution de ce morceau du code donne ça :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6foreach 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 }
can't read "var_": no such variable
Merci d'avance,
Pavel





Répondre avec citation




Partager