Alex> When I use Discover Route and it doesn't find the node I am looking
Alex> for, I dismiss the window. But then the IP-Discover menuitem doesn't
Alex> return enabled in the menu. What is the correct procedure to terminate
Alex> the search?
There is no way to terminate a running command in an application.
Removing the window simply removes the window and does not change the
state of the application. The menu should become enabled again when
the Discover Route command finishes. (If it does not finish even after
some minutes, please let me know.)
The proper solution would allow to terminate a command running in any
application without destroying it, that is stoping a Discover Route
command should finish the command but not destroy the IP-Discover
tool. But this would require asynchronous communication between tkined
and its application, which is not possible yet.
A short term solution is below. The "Kill Interpreter" of the Tools
menu allows you to kick away any application. The diff is against the
manager.tcl script from scotty-0.9i. There are some other changes that
let you define new entrys for the Tools menu by adding lines like
manager.tool.Game: game.tcl
to your tkined.defaults file.
Juergen
*** scotty-0.9i/tkined/manager.tcl Tue Jul 19 16:41:28 1994
--- manager.tcl Tue Jul 26 12:07:16 1994
***************
*** 17,23 ****
## express or implied warranty.
##
! LoadDefaults remote
##
## Set up some default parameters.
--- 17,23 ----
## express or implied warranty.
##
! LoadDefaults remote manager
##
## Set up some default parameters.
***************
*** 244,249 ****
--- 244,288 ----
}
##
+ ## Kill an application form the tkined editor.
+ ##
+
+ proc "Kill Interpreter" { list } {
+
+ set interps ""
+ set tools ""
+ foreach comp [ined retrieve] {
+ switch [ined type $comp] {
+ INTERPRETER {
+ lappend interps $comp
+ }
+ TOOL {
+ lappend tools $comp
+ }
+ }
+ }
+
+ set list ""
+ foreach interp $interps {
+ set id [ined id $interp]
+ set tlist ""
+ foreach tool $tools {
+ if {[ined interpreter [ined id $tool]] == $id} {
+ lappend tlist [lindex $tool 2]
+ }
+ }
+ if {$tlist != ""} {
+ lappend list [format "%-14s %s" $id $tlist]
+ }
+ }
+
+ set result [ined list "Select an interpreter to kill:" $list]
+ if {$result == ""} return
+
+ ined delete [lindex [lindex $result 0] 0]
+ }
+
+ ##
## Display some help about this tool.
##
***************
*** 322,327 ****
--- 361,367 ----
}
lappend cmds "Event Filter"
lappend cmds ""
+
if {[FindScript netguard_adm.tcl] != ""} {
lappend cmds "NetGuard:User Client"
}
***************
*** 331,347 ****
--- 371,411 ----
if {[FindProgram tkgraphs] != ""} {
lappend cmds "NetGuard:Tkgraphs Client"
}
+
lappend cmds "Remote tkined:Connect"
lappend cmds "Remote tkined:Listen"
lappend cmds "Remote tkined:Info"
+
if {[local]} {
lappend cmds "IBR STUFF:BONES"
lappend cmds "IBR STUFF:BONES Browser"
lappend cmds "IBR STUFF:SimuLan"
lappend cmds "IBR STUFF:GAME"
}
+
+ set done 0
+ if {[info exists default]} {
+ foreach name [array names default] {
+ set l [split $name .]
+ if {[lindex $l 0] == "tool"} {
+
+ if {$done == 0} { lappend cmds "" ; set done 1}
+ set toolname [lindex $l 1]
+ set toolcmd $default($name)
+
+ # define a proc for the callback
+
+ proc $toolname [list list] [list StartScript $toolcmd]
+
+ lappend cmds $toolname
+ }
+ }
+ }
+
+
lappend cmds ""
lappend cmds "Start Script"
+ lappend cmds "Kill Interpreter"
lappend cmds "Show Clipboard"
lappend cmds ""
lappend cmds "Help Tools"