Index: TODO =================================================================== diff -u -rc00e6abc0c78284c5aef12eb2ca80e3d852b079c -rd12e042ad1ee6135bedf22dc9ad7b0f27208b654 --- TODO (.../TODO) (revision c00e6abc0c78284c5aef12eb2ca80e3d852b079c) +++ TODO (.../TODO) (revision d12e042ad1ee6135bedf22dc9ad7b0f27208b654) @@ -1167,6 +1167,7 @@ - reanimated 5 tests in xotcl/tests/testx.xotcl - reanimated 5 tests in tests/destroytest.tcl +- changed resolve_method_path to __resolve_method_path and made it protected TODO: - check "my" vs. "nsf::dispatch" in xotcl2.tcl Index: library/nx/nx.tcl =================================================================== diff -u -r02ec0d2caa6701949f29171520a462564299a611 -rd12e042ad1ee6135bedf22dc9ad7b0f27208b654 --- library/nx/nx.tcl (.../nx.tcl) (revision 02ec0d2caa6701949f29171520a462564299a611) +++ library/nx/nx.tcl (.../nx.tcl) (revision d12e042ad1ee6135bedf22dc9ad7b0f27208b654) @@ -332,15 +332,15 @@ ::nsf::methodproperty Class dealloc redefine-protected true ::nsf::methodproperty Class create redefine-protected true - ::nsf::method Object -per-object resolve_method_path { + ::nsf::method Object __resolve_method_path { -create:switch -per-object:switch -verbose:switch - object path } { # TODO: handle -create (actually, its absence) #puts "resolve_method_path" + set object [::nsf::current object] set methodName $path if {[string first " " $path]} { set methodName [lindex $path end] @@ -389,6 +389,7 @@ } return [list object $object methodName $methodName] } + ::nsf::methodproperty Object __resolve_method_path protected true # define method "method" for Class and Object @@ -422,7 +423,7 @@ set conditions [list] if {[info exists precondition]} {lappend conditions -precondition $precondition} if {[info exists postcondition]} {lappend conditions -postcondition $postcondition} - array set "" [::nx::Object resolve_method_path -create -verbose [::nsf::current object] $name] + array set "" [:__resolve_method_path -create -verbose $name] #puts "class method $(object).$(methodName) [list $arguments] {...}" set r [::nsf::method $(object) $(methodName) $arguments $body {*}$conditions] if {[info exists returns]} {nsf::methodproperty $(object) $r returns $returns} @@ -456,7 +457,7 @@ set conditions [list] if {[info exists precondition]} {lappend conditions -precondition $precondition} if {[info exists postcondition]} {lappend conditions -postcondition $postcondition} - array set "" [::nx::Object resolve_method_path -create -per-object -verbose [::nsf::current object] $name] + array set "" [:__resolve_method_path -create -per-object -verbose $name] #puts "object method $(object).$(methodName) [list $arguments] {...}" set r [::nsf::method $(object) -per-object $(methodName) $arguments $body {*}$conditions] if {[info exists returns]} {nsf::methodproperty $(object) $r returns $returns} @@ -653,15 +654,15 @@ # -objscope implies -nonleaf # Object public method alias {-nonleaf:switch -objscope:switch methodName cmd} { - array set "" [::nx::Object resolve_method_path -per-object -create -verbose [::nsf::current object] $methodName] + array set "" [:__resolve_method_path -per-object -create -verbose $methodName] #puts "object alias $(object).$(methodName) $cmd" ::nsf::alias $(object) -per-object $(methodName) \ {*}[expr {${objscope} ? "-objscope" : ""}] \ {*}[expr {${nonleaf} ? "-nonleaf" : ""}] \ $cmd } Class public method alias {-nonleaf:switch -objscope:switch methodName cmd} { - array set "" [::nx::Object resolve_method_path -create -verbose [::nsf::current object] $methodName] + array set "" [:__resolve_method_path -create -verbose $methodName] #puts "class alias $(object).$(methodName) $cmd" ::nsf::alias $(object) $(methodName) \ {*}[expr {${objscope} ? "-objscope" : ""}] \