From 06f1562d47662731ff1772c01207024353b013ad Mon Sep 17 00:00:00 2001 From: Jeff Hobbs Date: Mon, 20 Aug 2001 19:10:48 +0000 Subject: [PATCH] * 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) --- ChangeLog | 12 ++++++++++++ tkcon.tcl | 17 +++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) 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]] } } -- 2.23.0