# tkcon master set ::tkcon:PRIV(proxy) wwwproxy:8080
#
-if {[string match windows $tcl_platform(platform)]} {
- # used for a send alternative
- #package require dde
-}
-
if {$tcl_version < 8.0} {
return -code error "tkcon requires at least Tcl/Tk8"
} else {
set numtabs [llength $PRIV(tabs)]
if {$numtabs == 1} { return }
- if {[string is integer -strict $con]} {
+ if {[regexp {^[0-9]+$} $con]} {
set curtab [lsearch -exact $PRIV(tabs) $PRIV(console)]
set nexttab [expr {$curtab + $con}]
if {$nexttab >= $numtabs} {
set nexttab "end"
}
set con [lindex $PRIV(tabs) $nexttab]
- } elseif {$con eq $PRIV(console)} {
+ } elseif {$con == $PRIV(console)} {
return
}
GotoTab [lindex $PRIV(tabs) $nexttab]
- if {$slave ne ""} {
+ if {$slave != ""} {
interp delete $slave
}
destroy $PRIV(tabframe).cb[winfo name $con]
variable OPT
variable PRIV
- set w $PRIV(console)
- if {[winfo exists $w]} {
- ## Remove error tags that no longer span anything
- ## Make sure the tag pattern matches the unique tag prefix
- foreach tag [$w tag names] {
- if {[string match _tag* $tag] && ![llength [$w tag ranges $tag]]} {
- $w tag delete $tag
+ foreach w $PRIV(tabs) {
+ if {[winfo exists $w]} {
+ ## Remove error tags that no longer span anything
+ ## Make sure the tag pattern matches the unique tag prefix
+ foreach tag [$w tag names] {
+ if {[string match _tag* $tag]
+ && ![llength [$w tag ranges $tag]]} {
+ $w tag delete $tag
+ }
}
}
}
return
}
AddSlaveHistory $cmd
- catch {EvalAttached [list set {} $res]}
+ catch {EvalAttached [list set _ $res]}
if {$code} {
if {$OPT(hoterrors)} {
set tag [UniqueTag $w]
if {![llength $args]} { set args observe_var }
foreach c [uplevel 1 [list trace vinfo $name]] {
# don't double up on the traces
- if {[string equal [list $type $args] $c]} { return }
+ if {[list $type $args] == $c} { return }
}
uplevel 1 [list trace $opt $name $type $args]
}
&& [lsearch -exact [dde services TclEval {}] \
[list TclEval $app]] > -1} {
eval [list ::dde eval $app] $args
- } elseif {[package provide comm] != {} && $::tcl_version >= 8.2
- && [string is integer -strict [lindex $app 0]]} {
+ } elseif {[package provide comm] != {}
+ && [regexp {^[0-9]+$} [lindex $app 0]]} {
#if {$opts(displayof) != {} && [llength $app] == 1} {
# lappend app $opts(displayof)
#}