foreach i {1 2 3 4 5} {
button .$i -text "$i" -command "puts $i"
pack .$i -side left
}
In this code I use information available at the time the buttons
are created ($i), that won't be available when the button is pushed
if I wanted to used a callback (like I think I have to in
python).
Any suggestions ?
Thanks in advance,
Benny