#!/afs/ece/usr/tcl/bin/wish -f
# The next line is executed by most shells, but not Tcl \
wish $0 $*


foreach pair {{get_widget aux/teach.tcl}} {
  if {[info procs [lindex $pair 0]] == ""} {
    source "[file dirname [info script]]/../[lindex $pair 1]"
}}


# Help text.
set Help "" ; append Help {Dialogth -- Add Keyboard Traversal to Tk's Dialog Box

This program adds numbers to Tk's dialog box. Now the 1 key picks the leftmost
button, the 2 key picks the next, and so on. The 0 key picks the default
button.


Widgets of Dialogth

The Teach Menu

  Dialog

Select the Dialog entry off the Teach menu, then click on a remote application
to teach it the new dialog procedure.

} $TH_Help


proc teach_code {} {
  global TH_Dir App
  if {[send $App info procs tk_dialog] != ""} {
    do_cmd "rename tk_dialog {}\n" 0}
  include_files dialog.tcl
}


.buttons.teach.m add command -label "Dialog" -command {
	if {![get_widget]} {beep} else {clear_output ; teach_code}}
