From 622f0c1bafa14d576ea66cb305bfc4e9395ac764 Mon Sep 17 00:00:00 2001 From: Jeff Hobbs Date: Fri, 24 Aug 2001 21:32:34 +0000 Subject: [PATCH] * tkcon.tcl (NewSocket, NewDisplay): when nothing is specified, just return. (Display): fixed connecting to interps on other displays. --- ChangeLog | 6 ++++++ tkcon.tcl | 14 ++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7912dfd..f83d5c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-08-24 Jeff Hobbs + + * tkcon.tcl (NewSocket, NewDisplay): when nothing is specified, + just return. + (Display): fixed connecting to interps on other displays. + 2001-08-22 Jeff Hobbs * docs/bindings.html: noted ^r/^s change. diff --git a/tkcon.tcl b/tkcon.tcl index 508472e..91af6be 100755 --- a/tkcon.tcl +++ b/tkcon.tcl @@ -1878,6 +1878,7 @@ proc ::tkcon::NewSocket {} { wm withdraw $t set host [$t.host get] set port [$t.port get] + if {$host == ""} { return } if {[catch { set sock [socket $host $port] } err]} { @@ -2127,20 +2128,16 @@ proc ::tkcon::MainInit {} { variable DISP set res {} - if {[string compare {} $disp]} { - if {![info exists DISP($disp)]} { - return - } + if {$disp != ""} { + if {![info exists DISP($disp)]} { return } return [list $DISP($disp) [winfo interps -displayof $DISP($disp)]] } - foreach d [array names DISP] { - lappend res [string range $d 5 end] - } - return $res + return [lsort -dictionary [array names DISP]] } proc ::tkcon::NewDisplay {} { variable PRIV + variable DISP set t $PRIV(base).newdisp if {![winfo exists $t]} { @@ -2170,6 +2167,7 @@ proc ::tkcon::MainInit {} { grab release $t wm withdraw $t set disp [$t.data get] + if {$disp == ""} { return } regsub -all {\.} [string tolower $disp] ! dt set dt $PRIV(base).$dt destroy $dt -- 2.23.0