Index: library/nx/nx.tcl =================================================================== diff -u -r6a97bd0373b34be566156f003a6f22ff0184b0ca -rbb1a4116720d5f205e44ec71f03857a340751fc3 --- library/nx/nx.tcl (.../nx.tcl) (revision 6a97bd0373b34be566156f003a6f22ff0184b0ca) +++ library/nx/nx.tcl (.../nx.tcl) (revision bb1a4116720d5f205e44ec71f03857a340751fc3) @@ -507,10 +507,10 @@ } :protected method defaultmethod {} { - if {[catch {set obj [uplevel ::nsf::current]}]} { + if {[catch {set obj [::uplevel ::nsf::current]}]} { error "ensemble dispatch called outside of method context" } - set path [uplevel {::nsf::current methodpath}] + set path [::uplevel {::nsf::current methodpath}] set l [string length $path] set submethods [$obj ::nsf::methods::object::info::lookupmethods -path "$path *"] foreach sm $submethods {set results([lindex [string range $sm $l+1 end] 0]) 1} @@ -1719,11 +1719,11 @@ # # Use uplevel to avoid namespace surprises # - uplevel [list ::nsf::relation::set $obj $prop [linsert $oldSetting $pos $value]] + ::uplevel [list ::nsf::relation::set $obj $prop [linsert $oldSetting $pos $value]] } RelationSlot public method value=delete {-nocomplain:switch obj prop value} { - uplevel [list ::nsf::relation::set $obj $prop \ + ::uplevel [list ::nsf::relation::set $obj $prop \ [:delete_value $obj $prop [::nsf::relation::get $obj $prop] $value]] } @@ -2586,7 +2586,7 @@ # Obtain the namespace from plain uplevel to honor the # namespace provided by apply # - set childof [uplevel {namespace current}] + set childof [::uplevel {namespace current}] } # # Use the uplevel method to assure that e.g. "... new -volatile ..." @@ -3039,9 +3039,9 @@ if {[info command ::lmap] eq ""} { # provide a simple forward compatible version of Tcl 8.6's lmap proc lmap {_var list body} { - upvar 1 $_var var + ::upvar 1 $_var var set res {} - foreach var $list {lappend res [uplevel 1 $body]} + foreach var $list {lappend res [::uplevel 1 $body]} return $res } } Index: library/xotcl/library/xotcl2.tcl =================================================================== diff -u -rb604626384c5692394df7e276ac9c10e6229dbfd -rbb1a4116720d5f205e44ec71f03857a340751fc3 --- library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision b604626384c5692394df7e276ac9c10e6229dbfd) +++ library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision bb1a4116720d5f205e44ec71f03857a340751fc3) @@ -97,12 +97,12 @@ proc ::xotcl::self {{arg ""}} { switch $arg { - "" {uplevel ::nsf::self} + "" {::uplevel ::nsf::self} next { - set handle [uplevel ::nsf::current nextmethod] + set handle [::uplevel ::nsf::current nextmethod] method_handle_to_xotcl $handle } - default {uplevel ::nsf::current $arg} + default {::uplevel ::nsf::current $arg} } } @@ -422,7 +422,7 @@ if {[::nsf::current isnextcall]} { set lvl [::nsf::current callinglevel] } - uplevel $lvl [list [self] create {*}$args] + ::uplevel $lvl [list [self] create {*}$args] } Object instproc unknown {m args} { @@ -645,7 +645,7 @@ flag [$o ::nsf::methods::${scope}::info::method parameter $method] { if {$argName eq $arg} { # we are in a proc, so using built-in "upvar" is safe - upvar $varName default + ::upvar $varName default if {[llength $flag] == 2} { set default [lindex $flag 1] #puts "--- get $scope default for $o $method $arg => setting default to '$default'" @@ -925,7 +925,7 @@ # definition of "xotcl::Class slots", based on contains ::xotcl::Class instproc slots {cmd} { set slotContainer [::nx::slotObj [self]] - uplevel [list [self] contains -object $slotContainer $cmd] + ::uplevel [list [self] contains -object $slotContainer $cmd] } # @@ -1062,8 +1062,8 @@ ::nsf::method::create ::xotcl::Class -per-object __unknown {name} {} ::nsf::object::unknown::add xotcl {::xotcl::Class __unknown} - proc myproc {args} {linsert $args 0 [uplevel ::nsf::self]} - proc myvar {var} {[uplevel ::nsf::self] requireNamespace; return [uplevel ::nsf::self]::$var} + proc myproc {args} {linsert $args 0 [::uplevel ::nsf::self]} + proc myvar {var} {[::uplevel ::nsf::self] requireNamespace; return [::uplevel ::nsf::self]::$var} # # create ::xotcl::MetaSlot for better compatibility with XOTcl 1 @@ -1297,7 +1297,7 @@ # Object instproc extractConfigureArg {al name {cutTheArg 0}} { set value "" - upvar $al argList + ::upvar $al argList set largs [llength $argList] for {set i 0} {$i < $largs} {incr i} { if {[lindex $argList $i] == $name && $i + 1 < $largs} { @@ -1429,7 +1429,7 @@ } set :component $pkg lappend :uses($prevComponent) ${:component} - set v [uplevel \#1 [set :packagecmd] require $args] + set v [::uplevel \#1 [set :packagecmd] require $args] if {$v ne "" && ${:verbose}} { set path [lindex [::package ifneeded $pkg $v] 1] puts "... $pkg $v loaded from '$path'"