From: Jeff Hobbs Date: Mon, 21 Feb 2005 19:31:36 +0000 (+0000) Subject: * tkcon.tcl (::send::send): propagate -displayof to winfo interps X-Git-Tag: tkcon-2-5~28 X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=dcbafaa47f8bce874332689a6654cac554f887b0;p=tkcon * tkcon.tcl (::send::send): propagate -displayof to winfo interps call. [Bug 1124369] (mbec) --- diff --git a/ChangeLog b/ChangeLog index bbb5bfa..92f4ebe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-02-21 Jeff Hobbs + + * tkcon.tcl (::send::send): propagate -displayof to winfo interps + call. [Bug 1124369] (mbec) + 2004-11-17 Jeff Hobbs * tkcon.tcl (::tkcon::ExpandVariable): correct array keyname diff --git a/tkcon.tcl b/tkcon.tcl index 166793f..e3dd8fc 100755 --- a/tkcon.tcl +++ b/tkcon.tcl @@ -900,6 +900,7 @@ proc ::tkcon::EvalCmd {w cmd} { if {$OPT(subhistory)} { set ev [EvalSlave history nextid] incr ev -1 + ## FIX: calcmode doesn't work with requesting history events if {[string match !! $cmd]} { set code [catch {EvalSlave history event $ev} cmd] if {!$code} {$w insert output $cmd\n stdin} @@ -6033,16 +6034,20 @@ proc ::tkcon::Retrieve {} { } } -## 'send' pacakge that handles multiple communication variants +## 'send' package that handles multiple communication variants ## # Try using Tk send first, then look for a winsend interp, # then try dde and finally have a go at comm namespace eval ::send {} proc ::send::send {args} { + set winfoInterpCmd [list ::winfo interps] array set opts [list displayof {} async 0] while {[string match -* [lindex $args 0]]} { switch -exact -- [lindex $args 0] { - -displayof { set opts(displayof) [Pop args 1] } + -displayof { + set opts(displayof) [Pop args 1] + lappend winfoInterpCmd -displayof $opts(displayof) + } -async { set opts(async) 1 } -- { Pop args ; break } default { @@ -6055,7 +6060,7 @@ proc ::send::send {args} { set app [Pop args] if {[llength [info commands ::winfo]] - && [lsearch -exact [::winfo interps] $app] > -1} { + && [lsearch -exact [eval $winfoInterpCmd] $app] > -1} { set cmd [list ::send] if {$opts(async) == 1} {lappend cmd -async} if {$opts(displayof) != {}} {lappend cmd -displayof $opts(displayof)} @@ -6080,10 +6085,14 @@ proc ::send::send {args} { } proc ::send::interps {args} { + set winfoInterpCmd [list ::winfo interps] array set opts [list displayof {}] while {[string match -* [lindex $args 0]]} { switch -exact -- [lindex $args 0] { - -displayof { set opts(displayof) [Pop args 1] } + -displayof { + set opts(displayof) [Pop args 1] + lappend winfoInterpCmd -displayof $opts(displayof) + } -- { Pop args ; break } default { return -code error "bad option \"[lindex $args 0]\":\ @@ -6095,11 +6104,7 @@ proc ::send::interps {args} { set interps {} if {[llength [info commands ::winfo]]} { - set cmd [list ::winfo interps] - if {$opts(displayof) != {}} { - lappend cmd -displayof $opts(displayof) - } - set interps [concat $interps [eval $cmd]] + set interps [concat $interps [eval $winfoInterpCmd]] } if {[llength [info commands ::winsend]]} { set interps [concat $interps [::winsend interps]]