#!/usr/local/bin/wish -f
#
# client starter for "tkedit":
#
# loads a file into an existing "tkedit" and waits until this file is closed
# introduced on strong demand from the "emacs" fraction
#
# USES TCL-TK send !
# use MIT-Magic cookie or recompile the wish with the TK_NO_SECURITY option
#
wm withdraw .
set file [lindex $argv 0]
send tkedit "loadFile $file"
set flag 1
while {$flag == 1} {
   set flag [send tkedit "CheckFile $file"]
   if {$flag == 0} break
   after 1000
}
exit
