Index: tests/forwardtest.tcl =================================================================== diff -u -rb07223692b7ed8b9b1cfc81f202f73c066456c7c -r89b5047e54e47a88a7de75d8523a07ffa5743407 --- tests/forwardtest.tcl (.../forwardtest.tcl) (revision b07223692b7ed8b9b1cfc81f202f73c066456c7c) +++ tests/forwardtest.tcl (.../forwardtest.tcl) (revision 89b5047e54e47a88a7de75d8523a07ffa5743407) @@ -65,7 +65,7 @@ ########################################### Test case mixin-via-forward { Object create mixin { - :method unknown {m args} {return [concat [self] $m $args]} + :method unknown {m args} {return [concat [current] $m $args]} } Object create obj { @@ -162,7 +162,7 @@ package require nx::serializer Test case serializer { Object create obj { - :method test {} {puts "i am [self proc]"} + :method test {} {puts "i am [current proc]"} } set ::a [Serializer deepSerialize obj] #puts <<$::a>> @@ -180,10 +180,10 @@ } ? {obj append x y z} 2yz - Object create n; Object create n::x {:method self {} {self}} + Object create n; Object create n::x {:method current {} {current}} Object create o o forward ::n::x - ? {o x self} ::n::x + ? {o x current} ::n::x } ########################################### @@ -261,9 +261,9 @@ Test case num-args { Object create obj { :forward f %self [list %argclindex [list a b c]] - :method a args {return [list [self proc] $args]} - :method b args {return [list [self proc] $args]} - :method c args {return [list [self proc] $args]} + :method a args {return [list [current proc] $args]} + :method b args {return [list [current proc] $args]} + :method c args {return [list [current proc] $args]} } ? {obj f} [list a {}] ? {obj f 1 } [list b 1] @@ -364,22 +364,22 @@ Object forward expr -objscope Class create C { - :method xx {} {self} + :method xx {} {current} :object method t {o expr} { return [$o expr $expr] } } C create c1 - ? {c1 expr {[self]}} ::c1 - ? {c1 expr {[self] == "::c1"}} 1 + ? {c1 expr {[current]}} ::c1 + ? {c1 expr {[current] == "::c1"}} 1 ? {c1 expr {[:xx]}} ::c1 ? {c1 expr {[:info class]}} ::C ? {c1 expr {[:info is type C]}} 1 ? {c1 expr {[:info is type ::C]}} 1 - ? {C t ::c1 {[self]}} ::c1 - ? {C t ::c1 {[self] == "::c1"}} 1 + ? {C t ::c1 {[current]}} ::c1 + ? {C t ::c1 {[current] == "::c1"}} 1 ? {C t ::c1 {[:xx]}} ::c1 ? {C t ::c1 {[:info class]}} ::C ? {C t ::c1 {[:info is type C]}} 1