Thursday, March 03, 2005

It's a little tricky to define a menu on the fly in CCP4 Tcl. The trouble is mainly with where to put the quotation marks. I adapted this from dhm_tool.tcl in CCP4i:
puts "test=($test)"

for { set i 0 } { $i <= $test } { incr i } {
lappend menulist "$i"
lappend fileselect(ALIASLIST) $i

incr test

DefineMenu _input_columns $menulist $fileselect(ALIASLIST)

For truly dynamic menus, try varmenus.