SloppyNick
Programmer
I am trying to create a dynamic GUI in Tcl/Tk. I have a spinbox that the user can manipulate, and I have a number of checkbuttons that I want to be able to refer to dynamically.
So, for example, in the spinbutton callback, $value refers to the value of the spinbutton. chk$value is the name of a checkbutton that I want to be able to manipulate. However, to access this variable, I would have to reference it with '$', which would look like $chk($value), assuming that parentheses would cause $value to be substituted first. However, I understand that all substitutions are done in one step. Is there any way to get around this? I have tried messing around with {} and eval, but to no avail.
So, for example, in the spinbutton callback, $value refers to the value of the spinbutton. chk$value is the name of a checkbutton that I want to be able to manipulate. However, to access this variable, I would have to reference it with '$', which would look like $chk($value), assuming that parentheses would cause $value to be substituted first. However, I understand that all substitutions are done in one step. Is there any way to get around this? I have tried messing around with {} and eval, but to no avail.