+2002-10-01 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * tkcon.tcl (InterpEval): correctly handle no args case.
+ (New): autoload tbcload when it exists.
+
2002-06-22 Jeff Hobbs <jeffh@ActiveState.com>
* tkcon.tcl: call Init with eval to break out argv into args.
set tmp [interp create Slave[GetSlaveNum]]
lappend PRIV(slaves) $tmp
load {} Tk $tmp
+ # If we have tbcload, then that should be autoloaded into slaves.
+ set idx [lsearch [info loaded] "* Tbcload"]
+ if {$idx != -1} { catch {load {} Tbcload $tmp} }
lappend PRIV(interps) [$tmp eval [list tk appname \
"[tk appname] $tmp"]]
if {[info exist argv0]} {$tmp eval [list set argv0 $argv0]}
proc ::tkcon::InterpEval {{slave {}} args} {
variable PRIV
- if {[string match {} $slave]} {
+ if {[llength [info level 0]] == 1} {
+ # no args given
return $PRIV(slaves)
} elseif {[string match {[Mm]ain} $slave]} {
set slave {}
}
proc ::tkcon::Interps {{ls {}} {interp {}}} {
- if {[string match {} $interp]} { lappend ls {} [tk appname] }
+ if {[string match {} $interp]} {
+ lappend ls {} [tk appname]
+ }
foreach i [interp slaves $interp] {
if {[string compare {} $interp]} { set i "$interp $i" }
if {[string compare {} [interp eval $i package provide Tk]]} {