Index: generic/predefined.h =================================================================== diff -u -r675e28583d105313f7fbc1dad66d2696c18b19f4 -r555e7f84db642cb7f4d77c8a5189922e1287b3d4 --- generic/predefined.h (.../predefined.h) (revision 675e28583d105313f7fbc1dad66d2696c18b19f4) +++ generic/predefined.h (.../predefined.h) (revision 555e7f84db642cb7f4d77c8a5189922e1287b3d4) @@ -50,7 +50,7 @@ "lappend methods $name}\n" "return \"valid options are: [join [lsort $methods] {, }]\"}\n" "objectInfo method unknown {method args} {\n" -"error \"unknown info option \\\"$method\\\"; [my info info]\"}\n" +"error \"unknown info option \\\"$method\\\"; [.info info]\"}\n" "classInfo method info {cl} {\n" "set methods [list]\n" "foreach m [::info commands ::xotcl::classInfo::*] {\n" @@ -59,7 +59,7 @@ "lappend methods $name}\n" "return \"valid options are: [join [lsort $methods] {, }]\"}\n" "classInfo method unknown {method args} {\n" -"error \"unknown info option \\\"$method\\\"; [my info info]\"}\n" +"error \"unknown info option \\\"$method\\\"; [.info info]\"}\n" "namespace export Object Class}\n" "namespace eval ::xotcl {\n" "::xotcl::createobjectsystem ::xotcl::Object ::xotcl::Class}\n" @@ -113,7 +113,7 @@ "lappend methods $name}\n" "return \"valid options are: [join [lsort $methods] {, }]\"}\n" "::xotcl::objectInfo method unknown {method args} {\n" -"error \"unknown info option \\\"$method\\\"; [my info info]\"}\n" +"error \"unknown info option \\\"$method\\\"; [.info info]\"}\n" "::xotcl::classInfo method info {cl} {\n" "set methods [list]\n" "foreach m [::info commands ::xotcl::classInfo::*] {\n" @@ -122,7 +122,7 @@ "lappend methods $name}\n" "return \"valid options are: [join [lsort $methods] {, }]\"}\n" "::xotcl::classInfo method unknown {method args} {\n" -"error \"unknown info option \\\"$method\\\"; [my info info]\"}\n" +"error \"unknown info option \\\"$method\\\"; [.info info]\"}\n" "# info instargs\n" "# istype\n" "proc ::xotcl::info_args {inst o method} {\n" @@ -183,7 +183,7 @@ "::xotcl::Object create ::xotcl::@\n" "::xotcl::@ method unknown args {}\n" "proc ::xotcl::myproc {args} {linsert $args 0 [::xotcl::self]}\n" -"proc ::xotcl::myvar {var} {::xotcl::my requireNamespace; return [::xotcl::self]::$var}\n" +"proc ::xotcl::myvar {var} {.requireNamespace; return [::xotcl::self]::$var}\n" "namespace eval ::xotcl {\n" "namespace export Object Class @ myproc myvar Attribute}\n" "::xotcl::Class create ::xotcl::MetaSlot\n" @@ -260,8 +260,8 @@ "::xotcl::alias ::xotcl::Slot get ::xotcl::setinstvar\n" "::xotcl::alias ::xotcl::Slot assign ::xotcl::setinstvar\n" "::xotcl::Slot method add {obj prop value {pos 0}} {\n" -"if {![::xotcl::my multivalued]} {\n" -"error \"Property $prop of [::xotcl::my domain]->$obj ist not multivalued\"}\n" +"if {![set .multivalued]} {\n" +"error \"Property $prop of [set .domain]->$obj ist not multivalued\"}\n" "if {[$obj exists $prop]} {\n" "$obj set $prop [linsert [$obj set $prop] $pos $value]} else {\n" "$obj set $prop [list $value]}}\n" @@ -272,45 +272,43 @@ "error \"$value is not a $prop of $obj (valid are: $old)\"}}\n" "::xotcl::Slot method unknown {method args} {\n" "set methods [list]\n" -"foreach m [::xotcl::my info methods] {\n" +"foreach m [.info methods] {\n" "if {[::xotcl::Object info methods $m] ne \"\"} continue\n" "if {[string match __* $m]} continue\n" "lappend methods $m}\n" "error \"Method '$method' unknown for slot [::xotcl::self]; valid are: {[lsort $methods]]}\"}\n" "::xotcl::Slot method destroy {} {\n" -"::xotcl::instvar domain\n" -"if {$domain ne \"\"} {\n" -"$domain invalidateobjectparameter}\n" +"if {${.domain} ne \"\"} {\n" +"${.domain} invalidateobjectparameter}\n" "next}\n" "::xotcl::Slot method init {} {\n" -"::xotcl::instvar name domain manager per-object\n" -"set forwarder [expr {${per-object} ? \"forward\" : \"instforward\"}]\n" -"if {$domain eq \"\"} {\n" -"set domain [::xotcl::self callingobject]} else {\n" -"$domain invalidateobjectparameter}\n" -"$domain $forwarder $name -default [$manager defaultmethods] $manager %1 %self %proc}\n" +"set forwarder [expr {${.per-object} ? \"forward\" : \"instforward\"}]\n" +"if {${.domain} eq \"\"} {\n" +"set .domain [::xotcl::self callingobject]} else {\n" +"${.domain} invalidateobjectparameter}\n" +"${.domain} $forwarder ${.name} -default [${.manager} defaultmethods] ${.manager} %1 %self %proc}\n" "::xotcl::MetaSlot create ::xotcl::InfoSlot\n" "createBootstrapAttributeSlots ::xotcl::InfoSlot {\n" "{multivalued true}\n" "{elementtype ::xotcl::Class}}\n" "::xotcl::relation ::xotcl::InfoSlot superclass ::xotcl::Slot\n" "::xotcl::InfoSlot method get {obj prop} {$obj info $prop}\n" "::xotcl::InfoSlot method add {obj prop value {pos 0}} {\n" -"if {![::xotcl::my multivalued]} {\n" -"error \"Property $prop of [::xotcl::my domain]->$obj ist not multivalued\"}\n" +"if {![set .multivalued]} {\n" +"error \"Property $prop of ${.domain}->$obj ist not multivalued\"}\n" "$obj $prop [linsert [$obj info $prop] $pos $value]}\n" "::xotcl::InfoSlot method delete {-nocomplain:switch obj prop value} {\n" "set old [$obj info $prop]\n" "if {[string first * $value] > -1 || [string first \\[ $value] > -1} {\n" -"if {[my elementtype] ne \"\" && ![string match ::* $value]} {\n" +"if {${.elementtype} ne \"\" && ![string match ::* $value]} {\n" "set value ::$value}\n" -"return [$obj $prop [lsearch -all -not -glob -inline $old $value]]} elseif {[my elementtype] ne \"\"} {\n" +"return [$obj $prop [lsearch -all -not -glob -inline $old $value]]} elseif {${.elementtype} ne \"\"} {\n" "if {[string first :: $value] == -1} {\n" "if {![::xotcl::is $value object]} {\n" "error \"$value does not appear to be an object\"}\n" "set value [$value self]}\n" -"if {![::xotcl::is [my elementtype] class]} {\n" -"error \"$value does not appear to be of type [my elementtype]\"}}\n" +"if {![::xotcl::is ${.elementtype} class]} {\n" +"error \"$value does not appear to be of type ${.elementtype}\"}}\n" "set p [lsearch -exact $old $value]\n" "if {$p > -1} {\n" "$obj $prop [lreplace $old $p $p]} else {\n" @@ -320,8 +318,8 @@ "::xotcl::alias ::xotcl::InterceptorSlot set ::xotcl::relation ;# for backwards compatibility\n" "::xotcl::alias ::xotcl::InterceptorSlot assign ::xotcl::relation\n" "::xotcl::InterceptorSlot method add {obj prop value {pos 0}} {\n" -"if {![::xotcl::my multivalued]} {\n" -"error \"Property $prop of [::xotcl::my domain]->$obj ist not multivalued\"}\n" +"if {![set .multivalued]} {\n" +"error \"Property $prop of ${.domain}->$obj ist not multivalued\"}\n" "$obj $prop [linsert [$obj info $prop -guards] $pos $value]}\n" "foreach os {::xotcl ::xotcl2} {\n" "${os}::Object alloc ${os}::Class::slot\n" @@ -363,59 +361,56 @@ "if {$keep_old_value} {$obj set __oldvalue($var) $value}}\n" "::xotcl::Attribute method check_multiple_values {values predicate type obj var} {\n" "foreach value $values {\n" -"::xotcl::my check_single_value -keep_old_value false $value $predicate $type $obj $var}\n" +".check_single_value -keep_old_value false $value $predicate $type $obj $var}\n" "$obj set __oldvalue($var) $value}\n" "::xotcl::Attribute method mk_type_checker {} {\n" "set __initcmd \"\"\n" -"if {[::xotcl::my exists type]} {\n" -"::xotcl::my instvar type name\n" -"if {[::xotcl::is $type class]} {\n" +"if {[.exists type]} {\n" +"if {[::xotcl::is ${.type} class]} {\n" "set predicate [subst -nocommands {\n" -"[::xotcl::is \\$value object] && [::xotcl::is \\$value type $type]}]} elseif {[llength $type]>1} {\n" -"set predicate \"\\[$type \\$value\\]\"} else {\n" -"set predicate \"\\[[self] type=$type $name \\$value\\]\"}\n" -"::xotcl::my append valuechangedcmd [subst {\n" -"::xotcl::my [expr {[::xotcl::my multivalued] ?\n" -"\"check_multiple_values\" : \"check_single_value\"}] \\[\\$obj set $name\\] \\\n" -"{$predicate} [list $type] \\$obj $name}]\n" +"[::xotcl::is \\$value object] && [::xotcl::is \\$value type ${.type}]}]} elseif {[llength ${.type}]>1} {\n" +"set predicate \"\\[${.type} \\$value\\]\"} else {\n" +"set predicate \"\\[.type=${.type} ${.name} \\$value\\]\"}\n" +"append .valuechangedcmd [subst {\n" +"[expr {${.multivalued} ? \".check_multiple_values\" : \".check_single_value\"}] \\[\\$obj set ${.name}\\] \\\n" +"{$predicate} [list ${.type}] \\$obj ${.name}}]\n" "append __initcmd [subst -nocommands {\n" -"if {[::xotcl::my exists $name]} {::xotcl::my set __oldvalue($name) [::xotcl::my set $name]}\\n}]}\n" +"if {[.exists ${.name}]} {set .__oldvalue(${.name}) [set .${.name}]}\\n}]}\n" "return $__initcmd}\n" "::xotcl::Attribute method init {} {\n" -"::xotcl::my instvar domain name\n" "next ;# do first ordinary slot initialization\n" "set __initcmd \"\"\n" -"if {[::xotcl::my exists default]} {} elseif [::xotcl::my exists initcmd] {\n" -"append __initcmd \"::xotcl::my trace add variable [list $name] read \\\n" -"\\[list [::xotcl::self] __default_from_cmd \\[::xotcl::self\\] [list [::xotcl::my initcmd]]\\]\\n\"} elseif [::xotcl::my exists valuecmd] {\n" -"append __initcmd \"::xotcl::my trace add variable [list $name] read \\\n" -"\\[list [::xotcl::self] __value_from_cmd \\[::xotcl::self\\] [list [::xotcl::my valuecmd]]\\]\"}\n" -"if {[::xotcl::my exists valuechangedcmd]} {\n" -"append __initcmd \"::xotcl::my trace add variable [list $name] write \\\n" -"\\[list [::xotcl::self] __value_changed_cmd \\[::xotcl::self\\] [list [::xotcl::my valuechangedcmd]]\\]\"}\n" +"if {[.exists default]} {} elseif [.exists initcmd] {\n" +"append __initcmd \".trace add variable [list ${.name}] read \\\n" +"\\[list [::xotcl::self] __default_from_cmd \\[::xotcl::self\\] [list [set .initcmd]]\\]\\n\"} elseif [.exists valuecmd] {\n" +"append __initcmd \".trace add variable [list ${.name}] read \\\n" +"\\[list [::xotcl::self] __value_from_cmd \\[::xotcl::self\\] [list [set .valuecmd]]\\]\"}\n" +"if {[.exists valuechangedcmd]} {\n" +"append __initcmd \".trace add variable [list ${.name}] write \\\n" +"\\[list [::xotcl::self] __value_changed_cmd \\[::xotcl::self\\] [list [set .valuechangedcmd]]\\]\"}\n" "if {$__initcmd ne \"\"} {\n" -"my set initcmd $__initcmd}}\n" +"set .initcmd $__initcmd}}\n" "::xotcl::Class create ::xotcl::Slot::Nocheck \\\n" "-method check_single_value args {;} -method check_multiple_values args {;} \\\n" "-method mk_type_checker args {return \"\"}\n" "::xotcl::Class create ::xotcl::Slot::Optimizer \\\n" -"-method proc args {::xotcl::next; ::xotcl::my optimize} \\\n" -"-method forward args {::xotcl::next; ::xotcl::my optimize} \\\n" -"-method init args {::xotcl::next; ::xotcl::my optimize} \\\n" +"-method proc args {::xotcl::next; .optimize} \\\n" +"-method forward args {::xotcl::next; .optimize} \\\n" +"-method init args {::xotcl::next; .optimize} \\\n" "-method optimize {} {\n" -"if {[::xotcl::my multivalued]} return\n" -"if {[::xotcl::my defaultmethods] ne {get assign}} return\n" -"if {[::xotcl::my procsearch assign] ne \"::xotcl::Slot instcmd assign\"} return\n" -"if {[::xotcl::my procsearch get] ne \"::xotcl::Slot instcmd get\"} return\n" -"set forwarder [expr {[::xotcl::my per-object] ? \"parametercmd\":\"instparametercmd\"}]\n" -"[::xotcl::my domain] $forwarder [::xotcl::my name]}\n" +"if {[set .multivalued]} return\n" +"if {[set .defaultmethods] ne {get assign}} return\n" +"if {[.procsearch assign] ne \"::xotcl::Slot instcmd assign\"} return\n" +"if {[.procsearch get] ne \"::xotcl::Slot instcmd get\"} return\n" +"set forwarder [expr {[set .per-object] ? \"parametercmd\":\"instparametercmd\"}]\n" +"${.domain} $forwarder ${.name}}\n" "::xotcl::Attribute instmixin add ::xotcl::Slot::Optimizer\n" "::xotcl::Class create ::xotcl::ScopedNew -superclass ::xotcl::Class\n" "createBootstrapAttributeSlots ::xotcl::ScopedNew {\n" "{withclass ::xotcl::Object}\n" "inobject}\n" "::xotcl::ScopedNew method init {} {\n" -"::xotcl::my method new {-childof args} {\n" +".method new {-childof args} {\n" "[::xotcl::self class] instvar {inobject object} withclass\n" "if {![::xotcl::is $object object]} {\n" "$withclass create $object}\n" @@ -436,7 +431,7 @@ "::xotcl::Class instmixin delete $m} else {\n" "namespace eval $object $cmds}}\n" "::xotcl::Class instforward slots %self contains \\\n" -"-object {%::xotcl::my subst [::xotcl::self]::slot}\n" +"-object {%::xotcl::dispatch [::xotcl::self] -objscope ::subst [::xotcl::self]::slot}\n" "::xotcl::Class method parameter arglist {\n" "if {![::xotcl::is [::xotcl::self]::slot object]} {\n" "::xotcl::Object create [::xotcl::self]::slot}\n" @@ -486,7 +481,7 @@ "return \\[eval $access $setter $extra $name \\$args $defaultParam \\]}\"\n" "foreach instvar {extra defaultParam setter getter access} {\n" "$po unset -nocomplain $instvar}} else {\n" -"::xotcl::my instparametercmd $name}}}\n" +".instparametercmd $name}}}\n" "[::xotcl::self]::slot set __parameter $arglist}\n" "::xotcl::Object method self {} {::xotcl::self}\n" "::xotcl::Object method defaultmethod {} {\n" @@ -495,7 +490,7 @@ "if {[::xotcl::is [self] mixin $cl]} {return 1}\n" "::xotcl::is [self] type $cl}\n" "::xotcl::Class method allinstances {} {\n" -"return [::xotcl::my info instances -closure]}\n" +"return [.info instances -closure]}\n" "::xotcl::alias ::xotcl2::Class parameter ::xotcl::classes::xotcl::Class::parameter\n" "::xotcl::alias ::xotcl2::Object defaultmethod ::xotcl::classes::xotcl::Object::defaultmethod\n" "::xotcl::Object method -per-object unsetExitHandler {} {\n" @@ -512,7 +507,7 @@ "if {$methtype ne \"proc\" && $methtype ne \"instproc\" && $methtype ne \"method\"} {\n" "error \"invalid method type '$methtype', \\\n" "must be either 'proc', 'instproc' or 'method'.\"}\n" -"::xotcl::my $methtype $methname $arglist \"\n" +".$methtype $methname $arglist \"\n" "if {!\\[::xotcl::self isnextcall\\]} {\n" "error \\\"Abstract method $methname $arglist called\\\"} else {::xotcl::next}\n" "\"}\n" @@ -521,7 +516,7 @@ "{dest \"\"}\n" "objLength}\n" "::xotcl::Object::CopyHandler method makeTargetList t {\n" -"::xotcl::my lappend targetList $t\n" +"lappend .targetList $t\n" "if {[::xotcl::is $t object]} {\n" "if {[$t info hasnamespace]} {\n" "set children [$t info children]} else {\n" @@ -530,16 +525,16 @@ "if {![::xotcl::is $c object]} {\n" "lappend children [namespace children $t]}}\n" "foreach c $children {\n" -"::xotcl::my makeTargetList $c}}\n" +".makeTargetList $c}}\n" "::xotcl::Object::CopyHandler method copyNSVarsAndCmds {orig dest} {\n" "::xotcl::namespace_copyvars $orig $dest\n" "::xotcl::namespace_copycmds $orig $dest}\n" "::xotcl::Object::CopyHandler method getDest origin {\n" -"set tail [string range $origin [::xotcl::my set objLength] end]\n" -"return ::[string trimleft [::xotcl::my set dest]$tail :]}\n" +"set tail [string range $origin [set .objLength] end]\n" +"return ::[string trimleft [set .dest]$tail :]}\n" "::xotcl::Object::CopyHandler method copyTargets {} {\n" -"foreach origin [::xotcl::my set targetList] {\n" -"set dest [::xotcl::my getDest $origin]\n" +"foreach origin [set .targetList] {\n" +"set dest [.getDest $origin]\n" "if {[::xotcl::is $origin object]} {\n" "if {[::xotcl::is $origin class]} {\n" "set cl [[$origin info class] create $dest -noinit]\n" @@ -548,7 +543,7 @@ "$cl instinvar [$origin info instinvar]\n" "$cl instfilter [$origin info instfilter -guards]\n" "$cl instmixin [$origin info instmixin]\n" -"my copyNSVarsAndCmds ::xotcl::classes$origin ::xotcl::classes$dest} else {\n" +".copyNSVarsAndCmds ::xotcl::classes$origin ::xotcl::classes$dest} else {\n" "set obj [[$origin info class] create $dest -noinit]}\n" "$obj invar [$origin info invar]\n" "$obj check [$origin info check]\n" @@ -557,7 +552,7 @@ "if {[$origin info hasnamespace]} {\n" "$obj requireNamespace}} else {\n" "namespace eval $dest {}}\n" -"::xotcl::my copyNSVarsAndCmds $origin $dest\n" +".copyNSVarsAndCmds $origin $dest\n" "foreach i [$origin info forward] {\n" "eval [concat $dest forward $i [$origin info forward -definition $i]]}\n" "if {[::xotcl::is $origin class]} {\n" @@ -572,32 +567,32 @@ "if {[lindex $def 0] eq $origin} {\n" "set def [concat $dest [lrange $def 1 end]]}\n" "$dest trace add variable $var $op $def}}}}\n" -"foreach origin [::xotcl::my set targetList] {\n" +"foreach origin [set .targetList] {\n" "if {[::xotcl::is $origin class]} {\n" -"set dest [::xotcl::my getDest $origin]\n" +"set dest [.getDest $origin]\n" "foreach oldslot [$origin info slots] {\n" "set newslot ${dest}::slot::[namespace tail $oldslot]\n" "if {[$oldslot domain] eq $origin} {$newslot domain $cl}\n" "if {[$oldslot manager] eq $oldslot} {$newslot manager $newslot}}}}}\n" "::xotcl::Object::CopyHandler method copy {obj dest} {\n" -"::xotcl::my set objLength [string length $obj]\n" -"::xotcl::my set dest $dest\n" -"::xotcl::my makeTargetList $obj\n" -"::xotcl::my copyTargets}\n" +"set .objLength [string length $obj]\n" +"set .dest $dest\n" +".makeTargetList $obj\n" +".copyTargets}\n" "::xotcl::Object method copy newName {\n" "if {[string compare [string trimleft $newName :] [string trimleft [::xotcl::self] :]]} {\n" "[[::xotcl::self class]::CopyHandler new -volatile] copy [::xotcl::self] $newName}}\n" "::xotcl::Object method move newName {\n" "if {[string trimleft $newName :] ne [string trimleft [::xotcl::self] :]} {\n" "if {$newName ne \"\"} {\n" -"::xotcl::my copy $newName}\n" +".copy $newName}\n" "if {[::xotcl::is [::xotcl::self] class] && $newName ne \"\"} {\n" -"foreach subclass [::xotcl::my info subclass] {\n" +"foreach subclass [.info subclass] {\n" "set scl [$subclass info superclass]\n" "if {[set index [lsearch -exact $scl [::xotcl::self]]] != -1} {\n" "set scl [lreplace $scl $index $index $newName]\n" "$subclass superclass $scl}} }\n" -"::xotcl::my destroy}}\n" +".destroy}}\n" "::xotcl::Object create ::xotcl::config\n" "::xotcl::config method load {obj file} {\n" "source $file\n" @@ -694,62 +689,60 @@ "if {$nq ne \"\" && ![namespace exists $nq]} {Object create $nq}\n" "next}\n" "::xotcl::package method -per-object extend {name args} {\n" -"my require $name\n" +".require $name\n" "eval $name configure $args}\n" "::xotcl::package method -per-object contains script {\n" -"if {[my exists provide]} {\n" -"package provide [my provide] [my version]} else {\n" -"package provide [::xotcl::self] [::xotcl::my version]}\n" +"if {[.exists provide]} {\n" +"package provide [set .provide] [set .version]} else {\n" +"package provide [::xotcl::self] [set .version]}\n" "namespace eval [::xotcl::self] {namespace import ::xotcl::*}\n" "namespace eval [::xotcl::self] $script\n" -"foreach e [my export] {\n" +"foreach e [set .export] {\n" "set nq [namespace qualifiers $e]\n" "if {$nq ne \"\"} {\n" "namespace eval [::xotcl::self]::$nq [list namespace export [namespace tail $e]]} else {\n" "namespace eval [::xotcl::self] [list namespace export $e]}}\n" -"foreach e [my autoexport] {\n" +"foreach e [set .autoexport] {\n" "namespace eval :: [list namespace import [::xotcl::self]::$e]}}\n" "::xotcl::package configure \\\n" "-set component . \\\n" "-set verbose 0 \\\n" "-set packagecmd ::package\n" "::xotcl::package method -per-object unknown args {\n" -"eval [my set packagecmd] $args}\n" +"eval [set .packagecmd] $args}\n" "::xotcl::package method -per-object verbose value {\n" -"my set verbose $value}\n" +"set .verbose $value}\n" "::xotcl::package method -per-object present args {\n" "if {$::tcl_version<8.3} {\n" -"my instvar loaded\n" "switch -exact -- [lindex $args 0] {\n" "-exact {set pkg [lindex $args 1]}\n" "default {set pkg [lindex $args 0]}}\n" -"if {[info exists loaded($pkg)]} {\n" -"return $loaded($pkg)} else {\n" +"if {[info exists .loaded($pkg)]} {\n" +"return ${.loaded}($pkg)} else {\n" "error \"not found\"}} else {\n" -"eval [my set packagecmd] present $args}}\n" +"eval [set .packagecmd] present $args}}\n" "::xotcl::package method -per-object import {{-into ::} pkg} {\n" -"my require $pkg\n" +".require $pkg\n" "namespace eval $into [subst -nocommands {\n" "namespace import ${pkg}::*}]\n" "foreach e [$pkg export] {\n" "set nq [namespace qualifiers $e]\n" "if {$nq ne \"\"} {\n" "namespace eval $into$nq [list namespace import ${pkg}::$e]}}}\n" -"::xotcl::package method -per-object require args {\n" -"::xotcl::my instvar component verbose uses loaded\n" -"set prevComponent $component\n" +"::xotcl::package method -per-object require args {\n" +"set prevComponent ${.component}\n" "if {[catch {set v [eval package present $args]} msg]} {\n" "switch -exact -- [lindex $args 0] {\n" "-exact {set pkg [lindex $args 1]}\n" "default {set pkg [lindex $args 0]}}\n" -"set component $pkg\n" -"lappend uses($prevComponent) $component\n" -"set v [uplevel \\#1 [my set packagecmd] require $args]\n" -"if {$v ne \"\" && $verbose} {\n" +"set .component $pkg\n" +"lappend .uses($prevComponent) ${.component}\n" +"set v [uplevel \\#1 [set .packagecmd] require $args]\n" +"if {$v ne \"\" && ${.verbose}} {\n" "set path [lindex [::package ifneeded $pkg $v] 1]\n" "puts \"... $pkg $v loaded from '$path'\"\n" -"set loaded($pkg) $v ;# loaded stuff needed for Tcl 8.0}}\n" -"set component $prevComponent\n" +"set .loaded($pkg) $v ;# loaded stuff needed for Tcl 8.0}}\n" +"set .component $prevComponent\n" "return $v}\n" "proc ::xotcl::tmpdir {} {\n" "foreach e [list TMPDIR TEMP TMP] {\n"