From: Jeff Hobbs Date: Mon, 20 Aug 2001 19:10:48 +0000 (+0000) Subject: * tkcon.tcl (EvalNamespace): fixed to work when attached to a X-Git-Tag: tkcon-2-4~44 X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=06f1562d47662731ff1772c01207024353b013ad;p=tkcon * tkcon.tcl (EvalNamespace): fixed to work when attached to a foreign interpreter. [Bug #453431] Added fix that allows access to Tk privates in 8.4. Still needs a long-term fix. [Bug #450865] (porter) --- diff --git a/ChangeLog b/ChangeLog index b08f400..cb45d58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2001-08-20 Jeff Hobbs + + * tkcon.tcl (EvalNamespace): fixed to work when attached to a + foreign interpreter. [Bug #453431] + Added fix that allows access to Tk privates in 8.4. Still needs + a long-term fix. [Bug #450865] (porter) + +2001-08-03 Jeff Hobbs + + * tkcon.tcl (EvalCmd): protected against non-existent + tkPriv(mouseMoved) variable + 2001-07-05 Jeff Hobbs * tkcon.tcl (RetrieveFilter, RetrieveAuthentication): added diff --git a/tkcon.tcl b/tkcon.tcl index b4cf9ea..ea5025d 100755 --- a/tkcon.tcl +++ b/tkcon.tcl @@ -59,6 +59,18 @@ foreach pkg [info loaded {}] { } catch {unset pkg file name version} +# Tk 8.4 makes previously exposed stuff private. +# FIX: Update tkcon to not rely on tje private Tk code. +# +if {![llength [info globals tkPriv]]} { + ::tk::unsupported::ExposePrivateVariable tkPriv +} +foreach cmd {SetCursor UpDownLine Transpose ScrollPages} { + if {![llength [info commands tkText$cmd]]} { + ::tk::unsupported::ExposePrivateCommand tkText$cmd + } +} + # Initialize the ::tkcon namespace # namespace eval ::tkcon { @@ -717,7 +729,7 @@ proc ::tkcon::EvalCmd {w cmd} { $w tag bind $tag \ [list $w tag configure $tag -under 0] $w tag bind $tag \ - "if {!\$tkPriv(mouseMoved)} \ + "if {!\[info exists tkPriv(mouseMoved)\] || !\$tkPriv(mouseMoved)} \ {[list edit -attach [Attach] -type error -- $PRIV(errorInfo)]}" } else { $w insert output $res\n stderr @@ -882,7 +894,8 @@ proc ::tkcon::EvalSocketClosed {} { ## proc ::tkcon::EvalNamespace { attached namespace args } { if {[llength $args]} { - uplevel \#0 $attached namespace eval [list $namespace $args] + uplevel \#0 $attached \ + [list [concat [list namespace eval $namespace] $args]] } }