#!/bin/sh # the next line restarts using wish\ exec wish "$0" "$@" # this script receives "data_block" with the (group) value # of the cobol variable and returns "result" ## visual tcl leaves the main window iconified, so let's show it wm deiconify . ###### put in this list varname, size pairs set cobol_fields { title 20 url 50 } grid [label .msg -text \ "Use to navigate, (or click button) \n\ to return to main program."] -columnspan 2 grid \ [label .lab1 -text "Title:"] \ [entry .e1 -width 20 -textvariable title] -padx 5 -pady 5 -sticky nsw grid \ [label .lab2 -text "URL:"] \ [entry .e2 -width 50 -textvariable url] -padx 5 -pady 5 -sticky nsw grid [button .ready -text Enter -command do_exit] \ -columnspan 2 -pady 20 -sticky ns bind all do_exit focus .e1 #trace add variable ::ready write show_variables proc show_variables {args} { uplevel #0 { set exclude {^::(env|auto_index|tcl_.*|widget|tk_.*|auto_.*)$} puts "variables: -----------------------------------------" foreach v [info vars ::*] { if {[regexp $exclude $v]} { continue } if {[array exists $v]} { puts "$v: [array get $v]" } else { puts "$v: [set $v]" } } } }