Index: TODO =================================================================== diff -u -rd137fce76cdcb71cb10ea76a24e480923124d12c -r42921ea037c4334cb6ecc565978330f9d8e902ec --- TODO (.../TODO) (revision d137fce76cdcb71cb10ea76a24e480923124d12c) +++ TODO (.../TODO) (revision 42921ea037c4334cb6ecc565978330f9d8e902ec) @@ -1511,9 +1511,15 @@ - defnied SKIP_LEVELS to omit optionally skipping of tcl-stack entries in GetSelfObj() +- added scripted replacement for binary nxsh +- new define SKIP_LAMBDA to make apply tests working without SKIP_LEVELS + +- renamed ::nsf::cmd::ObjectInfo into ::nsf::methods::object::info +- renamed ::nsf::cmd::ClassInfo into ::nsf::methods::class::info + TODO: - extend coro regression test -- remove traces of xowish +- remove traces of xowish. remove tclAppInt? - subcmd * handle sucmd for other method factories Index: generic/gentclAPI.decls =================================================================== diff -u -r8ee718fe7e27c3df71bc659f3261710a4aaf5805 -r42921ea037c4334cb6ecc565978330f9d8e902ec --- generic/gentclAPI.decls (.../gentclAPI.decls) (revision 8ee718fe7e27c3df71bc659f3261710a4aaf5805) +++ generic/gentclAPI.decls (.../gentclAPI.decls) (revision 42921ea037c4334cb6ecc565978330f9d8e902ec) @@ -8,9 +8,9 @@ array set ns { nsfCmd "::nsf" objectMethod "::nsf::cmd::Object" - objectInfoMethod "::nsf::cmd::ObjectInfo" + objectInfoMethod "::nsf::methods::object::info" classMethod "::nsf::cmd::Class" - classInfoMethod "::nsf::cmd::ClassInfo" + classInfoMethod "::nsf::methods::class::info" checkMethod "::nsf::cmd::ParameterType" } Index: generic/tclAPI.h =================================================================== diff -u -r8ee718fe7e27c3df71bc659f3261710a4aaf5805 -r42921ea037c4334cb6ecc565978330f9d8e902ec --- generic/tclAPI.h (.../tclAPI.h) (revision 8ee718fe7e27c3df71bc659f3261710a4aaf5805) +++ generic/tclAPI.h (.../tclAPI.h) (revision 42921ea037c4334cb6ecc565978330f9d8e902ec) @@ -140,10 +140,10 @@ static methodDefinition method_definitions[]; static CONST char *method_command_namespace_names[] = { - "::nsf::cmd::ObjectInfo", + "::nsf::methods::object::info", "::nsf::cmd::Object", "::nsf::cmd::ParameterType", - "::nsf::cmd::ClassInfo", + "::nsf::methods::class::info", "::nsf::cmd::Class" }; static int NsfCAllocMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); @@ -2055,53 +2055,53 @@ {"name", 1, 0, ConvertToTclobj}, {"args", 0, 0, ConvertToNothing}} }, -{"::nsf::cmd::ClassInfo::filterguard", NsfClassInfoFilterguardMethodStub, 1, { +{"::nsf::methods::class::info::filterguard", NsfClassInfoFilterguardMethodStub, 1, { {"filter", 1, 0, ConvertToString}} }, -{"::nsf::cmd::ClassInfo::filtermethods", NsfClassInfoFiltermethodsMethodStub, 2, { +{"::nsf::methods::class::info::filtermethods", NsfClassInfoFiltermethodsMethodStub, 2, { {"-guards", 0, 0, ConvertToString}, {"pattern", 0, 0, ConvertToString}} }, -{"::nsf::cmd::ClassInfo::forward", NsfClassInfoForwardMethodStub, 2, { +{"::nsf::methods::class::info::forward", NsfClassInfoForwardMethodStub, 2, { {"-definition", 0, 0, ConvertToString}, {"name", 0, 0, ConvertToString}} }, -{"::nsf::cmd::ClassInfo::heritage", NsfClassInfoHeritageMethodStub, 1, { +{"::nsf::methods::class::info::heritage", NsfClassInfoHeritageMethodStub, 1, { {"pattern", 0, 0, ConvertToString}} }, -{"::nsf::cmd::ClassInfo::instances", NsfClassInfoInstancesMethodStub, 2, { +{"::nsf::methods::class::info::instances", NsfClassInfoInstancesMethodStub, 2, { {"-closure", 0, 0, ConvertToString}, {"pattern", 0, 0, ConvertToObjpattern}} }, -{"::nsf::cmd::ClassInfo::method", NsfClassInfoMethodMethodStub, 2, { +{"::nsf::methods::class::info::method", NsfClassInfoMethodMethodStub, 2, { {"infomethodsubcmd", 0, 0, ConvertToInfomethodsubcmd}, {"name", 0, 0, ConvertToTclobj}} }, -{"::nsf::cmd::ClassInfo::methods", NsfClassInfoMethodsMethodStub, 5, { +{"::nsf::methods::class::info::methods", NsfClassInfoMethodsMethodStub, 5, { {"-methodtype", 0, 1, ConvertToMethodtype}, {"-callprotection", 0, 1, ConvertToCallprotection}, {"-nomixins", 0, 0, ConvertToString}, {"-incontext", 0, 0, ConvertToString}, {"pattern", 0, 0, ConvertToString}} }, -{"::nsf::cmd::ClassInfo::mixinof", NsfClassInfoMixinOfMethodStub, 3, { +{"::nsf::methods::class::info::mixinof", NsfClassInfoMixinOfMethodStub, 3, { {"-closure", 0, 0, ConvertToString}, {"-scope", 0, 1, ConvertToScope}, {"pattern", 0, 0, ConvertToObjpattern}} }, -{"::nsf::cmd::ClassInfo::mixinclasses", NsfClassInfoMixinclassesMethodStub, 3, { +{"::nsf::methods::class::info::mixinclasses", NsfClassInfoMixinclassesMethodStub, 3, { {"-closure", 0, 0, ConvertToString}, {"-guards", 0, 0, ConvertToString}, {"pattern", 0, 0, ConvertToObjpattern}} }, -{"::nsf::cmd::ClassInfo::mixinguard", NsfClassInfoMixinguardMethodStub, 1, { +{"::nsf::methods::class::info::mixinguard", NsfClassInfoMixinguardMethodStub, 1, { {"mixin", 1, 0, ConvertToString}} }, -{"::nsf::cmd::ClassInfo::subclass", NsfClassInfoSubclassMethodStub, 2, { +{"::nsf::methods::class::info::subclass", NsfClassInfoSubclassMethodStub, 2, { {"-closure", 0, 0, ConvertToString}, {"pattern", 0, 0, ConvertToObjpattern}} }, -{"::nsf::cmd::ClassInfo::superclass", NsfClassInfoSuperclassMethodStub, 2, { +{"::nsf::methods::class::info::superclass", NsfClassInfoSuperclassMethodStub, 2, { {"-closure", 0, 0, ConvertToString}, {"pattern", 0, 0, ConvertToTclobj}} }, @@ -2290,81 +2290,81 @@ {"::nsf::cmd::Object::vwait", NsfOVwaitMethodStub, 1, { {"varname", 1, 0, ConvertToString}} }, -{"::nsf::cmd::ObjectInfo::children", NsfObjInfoChildrenMethodStub, 2, { +{"::nsf::methods::object::info::children", NsfObjInfoChildrenMethodStub, 2, { {"-type", 0, 1, ConvertToClass}, {"pattern", 0, 0, ConvertToString}} }, -{"::nsf::cmd::ObjectInfo::class", NsfObjInfoClassMethodStub, 0, { +{"::nsf::methods::object::info::class", NsfObjInfoClassMethodStub, 0, { } }, -{"::nsf::cmd::ObjectInfo::filterguard", NsfObjInfoFilterguardMethodStub, 1, { +{"::nsf::methods::object::info::filterguard", NsfObjInfoFilterguardMethodStub, 1, { {"filter", 1, 0, ConvertToString}} }, -{"::nsf::cmd::ObjectInfo::filtermethods", NsfObjInfoFiltermethodsMethodStub, 3, { +{"::nsf::methods::object::info::filtermethods", NsfObjInfoFiltermethodsMethodStub, 3, { {"-guards", 0, 0, ConvertToString}, {"-order", 0, 0, ConvertToString}, {"pattern", 0, 0, ConvertToString}} }, -{"::nsf::cmd::ObjectInfo::forward", NsfObjInfoForwardMethodStub, 2, { +{"::nsf::methods::object::info::forward", NsfObjInfoForwardMethodStub, 2, { {"-definition", 0, 0, ConvertToString}, {"name", 0, 0, ConvertToString}} }, -{"::nsf::cmd::ObjectInfo::hasmixin", NsfObjInfoHasMixinMethodStub, 1, { +{"::nsf::methods::object::info::hasmixin", NsfObjInfoHasMixinMethodStub, 1, { {"class", 0, 0, ConvertToClass}} }, -{"::nsf::cmd::ObjectInfo::hastype", NsfObjInfoHasTypeMethodStub, 1, { +{"::nsf::methods::object::info::hastype", NsfObjInfoHasTypeMethodStub, 1, { {"class", 0, 0, ConvertToClass}} }, -{"::nsf::cmd::ObjectInfo::hasnamespace", NsfObjInfoHasnamespaceMethodStub, 0, { +{"::nsf::methods::object::info::hasnamespace", NsfObjInfoHasnamespaceMethodStub, 0, { } }, -{"::nsf::cmd::ObjectInfo::is", NsfObjInfoIsMethodStub, 1, { +{"::nsf::methods::object::info::is", NsfObjInfoIsMethodStub, 1, { {"objectkind", 0, 0, ConvertToObjectkind}} }, -{"::nsf::cmd::ObjectInfo::lookupfilter", NsfObjInfoLookupFilterMethodStub, 1, { +{"::nsf::methods::object::info::lookupfilter", NsfObjInfoLookupFilterMethodStub, 1, { {"filter", 0, 0, ConvertToString}} }, -{"::nsf::cmd::ObjectInfo::lookupmethod", NsfObjInfoLookupMethodMethodStub, 1, { +{"::nsf::methods::object::info::lookupmethod", NsfObjInfoLookupMethodMethodStub, 1, { {"name", 0, 0, ConvertToString}} }, -{"::nsf::cmd::ObjectInfo::lookupmethods", NsfObjInfoLookupMethodsMethodStub, 6, { +{"::nsf::methods::object::info::lookupmethods", NsfObjInfoLookupMethodsMethodStub, 6, { {"-methodtype", 0, 1, ConvertToMethodtype}, {"-callprotection", 0, 1, ConvertToCallprotection}, {"-source", 0, 1, ConvertToSource}, {"-nomixins", 0, 0, ConvertToString}, {"-incontext", 0, 0, ConvertToString}, {"pattern", 0, 0, ConvertToString}} }, -{"::nsf::cmd::ObjectInfo::lookupslots", NsfObjInfoLookupSlotsMethodStub, 1, { +{"::nsf::methods::object::info::lookupslots", NsfObjInfoLookupSlotsMethodStub, 1, { {"-type", 0, 1, ConvertToClass}} }, -{"::nsf::cmd::ObjectInfo::method", NsfObjInfoMethodMethodStub, 2, { +{"::nsf::methods::object::info::method", NsfObjInfoMethodMethodStub, 2, { {"infomethodsubcmd", 0, 0, ConvertToInfomethodsubcmd}, {"name", 0, 0, ConvertToTclobj}} }, -{"::nsf::cmd::ObjectInfo::methods", NsfObjInfoMethodsMethodStub, 5, { +{"::nsf::methods::object::info::methods", NsfObjInfoMethodsMethodStub, 5, { {"-methodtype", 0, 1, ConvertToMethodtype}, {"-callprotection", 0, 1, ConvertToCallprotection}, {"-nomixins", 0, 0, ConvertToString}, {"-incontext", 0, 0, ConvertToString}, {"pattern", 0, 0, ConvertToString}} }, -{"::nsf::cmd::ObjectInfo::mixinclasses", NsfObjInfoMixinclassesMethodStub, 3, { +{"::nsf::methods::object::info::mixinclasses", NsfObjInfoMixinclassesMethodStub, 3, { {"-guards", 0, 0, ConvertToString}, {"-order", 0, 0, ConvertToString}, {"pattern", 0, 0, ConvertToObjpattern}} }, -{"::nsf::cmd::ObjectInfo::mixinguard", NsfObjInfoMixinguardMethodStub, 1, { +{"::nsf::methods::object::info::mixinguard", NsfObjInfoMixinguardMethodStub, 1, { {"mixin", 1, 0, ConvertToString}} }, -{"::nsf::cmd::ObjectInfo::parent", NsfObjInfoParentMethodStub, 0, { +{"::nsf::methods::object::info::parent", NsfObjInfoParentMethodStub, 0, { } }, -{"::nsf::cmd::ObjectInfo::precedence", NsfObjInfoPrecedenceMethodStub, 2, { +{"::nsf::methods::object::info::precedence", NsfObjInfoPrecedenceMethodStub, 2, { {"-intrinsic", 0, 0, ConvertToString}, {"pattern", 0, 0, ConvertToString}} }, -{"::nsf::cmd::ObjectInfo::vars", NsfObjInfoVarsMethodStub, 1, { +{"::nsf::methods::object::info::vars", NsfObjInfoVarsMethodStub, 1, { {"pattern", 0, 0, ConvertToString}} },{NULL} }; Index: library/nx/nx.tcl =================================================================== diff -u -rdcd56c07afd64a356db1a4672a35b4aaf4caf6ea -r42921ea037c4334cb6ecc565978330f9d8e902ec --- library/nx/nx.tcl (.../nx.tcl) (revision dcd56c07afd64a356db1a4672a35b4aaf4caf6ea) +++ library/nx/nx.tcl (.../nx.tcl) (revision 42921ea037c4334cb6ecc565978330f9d8e902ec) @@ -87,12 +87,12 @@ set methodName [lindex $path end] foreach w [lrange $path 0 end-1] { #puts stderr "check $object info methods $path @ <$w>" - set scope [expr {[::nsf::is class $object] && !${per-object} ? "Class" : "Object"}] - if {[::nsf::dispatch $object ::nsf::cmd::${scope}Info::methods $w] eq ""} { + set scope [expr {[::nsf::is class $object] && !${per-object} ? "class" : "object"}] + if {[::nsf::dispatch $object ::nsf::methods::${scope}::info::methods $w] eq ""} { # # Create dispatch/ensemble object and accessor method (if wanted) # - if {$scope eq "Class"} { + if {$scope eq "class"} { if {![::nsf::isobject ${object}::slot]} { ::nsf::methodproperty $object [Object create ${object}::slot] protected true if {$verbose} {puts stderr "... create object ${object}::slot"} @@ -113,9 +113,9 @@ # The accessor method exists already, check, if it is # appropriate for extending. # - set type [::nsf::dispatch $object ::nsf::cmd::${scope}Info::method type $w] - set definition [::nsf::dispatch $object ::nsf::cmd::${scope}Info::method definition $w] - if {$scope eq "Class"} { + set type [::nsf::dispatch $object ::nsf::methods::${scope}::info::method type $w] + set definition [::nsf::dispatch $object ::nsf::methods::${scope}::info::method definition $w] + if {$scope eq "class"} { if {$type ne "alias"} {error "can't append to $type"} if {$definition eq ""} {error "definition must not be empty"} set object [lindex $definition end] @@ -374,13 +374,13 @@ # registed, give an Ensemble object. # set self [::nsf::current object] - set parent [::nsf::dispatch $self ::nsf::cmd::ObjectInfo::parent] - set grandparent [::nsf::dispatch $parent ::nsf::cmd::ObjectInfo::parent] + set parent [::nsf::dispatch $self ::nsf::methods::object::info::parent] + set grandparent [::nsf::dispatch $parent ::nsf::methods::object::info::parent] set tail [namespace tail $parent] if {$tail eq "slot" && [::nsf::is class $grandparent]} { - set aliases [::nsf::dispatch $grandparent ::nsf::cmd::ClassInfo::methods -methodtype alias] + set aliases [::nsf::dispatch $grandparent ::nsf::methods::class::info::methods -methodtype alias] foreach alias $aliases { - set def [::nsf::dispatch $grandparent ::nsf::cmd::ClassInfo::method definition $alias] + set def [::nsf::dispatch $grandparent ::nsf::methods::class::info::method definition $alias] if {[lindex $def end] eq $self} { return [list name [lindex $def 2] regobj ] } @@ -398,8 +398,8 @@ array set "" [$o ::nsf::classes::nx::EnsembleObject::subcmdName] set path $(name) while {1} { - set o [::nsf::dispatch $o ::nsf::cmd::ObjectInfo::parent] - if {![::nsf::dispatch $o ::nsf::cmd::ObjectInfo::hastype ::nx::EnsembleObject]} break + set o [::nsf::dispatch $o ::nsf::methods::object::info::parent] + if {![::nsf::dispatch $o ::nsf::methods::object::info::hastype ::nx::EnsembleObject]} break array set "" [$o ::nsf::classes::nx::EnsembleObject::subcmdName] set path "$(name) $path" } @@ -413,10 +413,10 @@ # set result [list] set self [::nsf::current object] - set methods [lsort [::nsf::dispatch $self ::nsf::cmd::ObjectInfo::methods]] + set methods [lsort [::nsf::dispatch $self ::nsf::methods::object::info::methods]] array set "" [$self ::nsf::classes::nx::EnsembleObject::subcmdName] foreach m $methods { - set type [::nsf::dispatch $self ::nsf::cmd::ObjectInfo::method type $m] + set type [::nsf::dispatch $self ::nsf::methods::object::info::method type $m] if {$type eq "object"} { foreach {obj submethod} \ [::nsf::dispatch ${self}::$m ::nsf::classes::nx::EnsembleObject::subMethods] { @@ -436,20 +436,20 @@ set self [::nsf::current object] #puts stderr "UNKNOWN [self] $args" array set "" [$self ::nsf::classes::nx::EnsembleObject::methodPath] - set subcmds [lsort [::nsf::dispatch $self ::nsf::cmd::ObjectInfo::methods]] + set subcmds [lsort [::nsf::dispatch $self ::nsf::methods::object::info::methods]] error "unable to dispatch method $(regobj) $(path) $m;\ valid subcommands of [namespace tail $self]: $subcmds" } :method defaultmethod {} { #puts uplevel-method=[uplevel {nx::current method}]-[uplevel nx::self] set self [current object] - set methods [lsort [::nsf::dispatch $self ::nsf::cmd::ObjectInfo::methods]] + set methods [lsort [::nsf::dispatch $self ::nsf::methods::object::info::methods]] array set "" [$self ::nsf::classes::nx::EnsembleObject::subcmdName] set pairs [$self ::nsf::classes::nx::EnsembleObject::subMethods] foreach {obj m} $pairs { array set "" [$obj ::nsf::classes::nx::EnsembleObject::methodPath] - set cmd [::nsf::dispatch $obj ::nsf::cmd::ObjectInfo::method parametersyntax $m] + set cmd [::nsf::dispatch $obj ::nsf::methods::object::info::method parametersyntax $m] puts stderr "$(regobj) $(path) $m $cmd" } return $methods @@ -466,34 +466,34 @@ # we have to use "eval", since objectParameters are not defined yet Object eval { - :alias "info lookup filter" ::nsf::cmd::ObjectInfo::lookupfilter - :alias "info lookup method" ::nsf::cmd::ObjectInfo::lookupmethod - :alias "info lookup methods" ::nsf::cmd::ObjectInfo::lookupmethods + :alias "info lookup filter" ::nsf::methods::object::info::lookupfilter + :alias "info lookup method" ::nsf::methods::object::info::lookupmethod + :alias "info lookup methods" ::nsf::methods::object::info::lookupmethods :method "info lookup slots" {} { ::nsf::dispatch [::nsf::current object] \ - ::nsf::cmd::ObjectInfo::lookupslots -type ::nx::Slot + ::nsf::methods::object::info::lookupslots -type ::nx::Slot } - :alias "info children" ::nsf::cmd::ObjectInfo::children - :alias "info class" ::nsf::cmd::ObjectInfo::class - :alias "info filter guard" ::nsf::cmd::ObjectInfo::filterguard - :alias "info filter methods" ::nsf::cmd::ObjectInfo::filtermethods - :alias "info forward" ::nsf::cmd::ObjectInfo::forward - :alias "info has mixin" ::nsf::cmd::ObjectInfo::hasmixin - :alias "info has namespace" ::nsf::cmd::ObjectInfo::hasnamespace - :alias "info has type" ::nsf::cmd::ObjectInfo::hastype - :alias "info is" ::nsf::cmd::ObjectInfo::is - :alias "info methods" ::nsf::cmd::ObjectInfo::methods - :alias "info mixin guard" ::nsf::cmd::ObjectInfo::mixinguard - :alias "info mixin classes" ::nsf::cmd::ObjectInfo::mixinclasses - :alias "info parent" ::nsf::cmd::ObjectInfo::parent - :alias "info precedence" ::nsf::cmd::ObjectInfo::precedence + :alias "info children" ::nsf::methods::object::info::children + :alias "info class" ::nsf::methods::object::info::class + :alias "info filter guard" ::nsf::methods::object::info::filterguard + :alias "info filter methods" ::nsf::methods::object::info::filtermethods + :alias "info forward" ::nsf::methods::object::info::forward + :alias "info has mixin" ::nsf::methods::object::info::hasmixin + :alias "info has namespace" ::nsf::methods::object::info::hasnamespace + :alias "info has type" ::nsf::methods::object::info::hastype + :alias "info is" ::nsf::methods::object::info::is + :alias "info methods" ::nsf::methods::object::info::methods + :alias "info mixin guard" ::nsf::methods::object::info::mixinguard + :alias "info mixin classes" ::nsf::methods::object::info::mixinclasses + :alias "info parent" ::nsf::methods::object::info::parent + :alias "info precedence" ::nsf::methods::object::info::precedence :method "info slots" {} { set slotContainer [::nsf::current object]::slot if {[::nsf::isobject $slotContainer]} { - ::nsf::dispatch $slotContainer ::nsf::cmd::ObjectInfo::children -type ::nx::Slot + ::nsf::dispatch $slotContainer ::nsf::methods::object::info::children -type ::nx::Slot } } - :alias "info vars" ::nsf::cmd::ObjectInfo::vars + :alias "info vars" ::nsf::methods::object::info::vars } # Create the ensemble object here to prepare for copy of the above @@ -508,35 +508,35 @@ # # copy all methods except the subobjects to ::nx::Class::slot::__info # - foreach m [::nsf::dispatch ::nx::Object::slot::__info ::nsf::cmd::ObjectInfo::methods] { - if {[::nsf::dispatch ::nx::Object::slot::__info ::nsf::cmd::ObjectInfo::method type $m] eq "object"} continue - set definition [::nsf::dispatch ::nx::Object::slot::__info ::nsf::cmd::ObjectInfo::method definition $m] + foreach m [::nsf::dispatch ::nx::Object::slot::__info ::nsf::methods::object::info::methods] { + if {[::nsf::dispatch ::nx::Object::slot::__info ::nsf::methods::object::info::method type $m] eq "object"} continue + set definition [::nsf::dispatch ::nx::Object::slot::__info ::nsf::methods::object::info::method definition $m] ::nx::Class::slot::__info {*}[lrange $definition 1 end] } Class eval { :alias "info lookup" ::nx::Object::slot::__info::lookup - :alias "info filter guard" ::nsf::cmd::ClassInfo::filterguard - :alias "info filter methods" ::nsf::cmd::ClassInfo::filtermethods - :alias "info forward" ::nsf::cmd::ClassInfo::forward + :alias "info filter guard" ::nsf::methods::class::info::filterguard + :alias "info filter methods" ::nsf::methods::class::info::filtermethods + :alias "info forward" ::nsf::methods::class::info::forward :alias "info has" ::nx::Object::slot::__info::has - :alias "info heritage" ::nsf::cmd::ClassInfo::heritage - :alias "info instances" ::nsf::cmd::ClassInfo::instances - :alias "info methods" ::nsf::cmd::ClassInfo::methods - :alias "info mixin guard" ::nsf::cmd::ClassInfo::mixinguard - :alias "info mixin classes" ::nsf::cmd::ClassInfo::mixinclasses - :alias "info mixinof" ::nsf::cmd::ClassInfo::mixinof - :alias "info subclass" ::nsf::cmd::ClassInfo::subclass - :alias "info superclass" ::nsf::cmd::ClassInfo::superclass + :alias "info heritage" ::nsf::methods::class::info::heritage + :alias "info instances" ::nsf::methods::class::info::instances + :alias "info methods" ::nsf::methods::class::info::methods + :alias "info mixin guard" ::nsf::methods::class::info::mixinguard + :alias "info mixin classes" ::nsf::methods::class::info::mixinclasses + :alias "info mixinof" ::nsf::methods::class::info::mixinof + :alias "info subclass" ::nsf::methods::class::info::subclass + :alias "info superclass" ::nsf::methods::class::info::superclass } # # Define "info info" and unknown # proc ::nx::infoOptions {obj} { - #puts stderr "INFO INFO $obj -> '[::nsf::dispatch $obj ::nsf::cmd::ObjectInfo::methods -methodtype all]'" + #puts stderr "INFO INFO $obj -> '[::nsf::dispatch $obj ::nsf::methods::object::info::methods -methodtype all]'" set methods [list] - foreach name [::nsf::dispatch $obj ::nsf::cmd::ObjectInfo::methods] { + foreach name [::nsf::dispatch $obj ::nsf::methods::object::info::methods] { if {$name eq "unknown"} continue lappend methods $name } @@ -551,8 +551,8 @@ Class method "info info" {} {::nx::infoOptions ::nx::Class::slot::__info} # finally register method "method" (otherwise, we cannot use "method" above) - Object alias "info method" ::nsf::cmd::ObjectInfo::method - Class alias "info method" ::nsf::cmd::ClassInfo::method + Object alias "info method" ::nsf::methods::object::info::method + Class alias "info method" ::nsf::methods::class::info::method # # Definition of "abstract method foo ...." @@ -625,13 +625,13 @@ } if {${per-object}} { lappend opts -per-object true - set info ObjectInfo + set scope object } else { - set info ClassInfo + set scope class } :create [::nx::slotObj $target $name] {*}$opts $initblock - return [::nsf::dispatch $target ::nsf::cmd::${info}::method handle $name] + return [::nsf::dispatch $target ::nsf::methods::${scope}::info::method handle $name] } } @@ -672,7 +672,7 @@ if {[info exists default]} { # checking subclasses is not required during bootstrap - foreach i [::nsf::dispatch $class ::nsf::cmd::ClassInfo::instances] { + foreach i [::nsf::dispatch $class ::nsf::methods::class::info::instances] { if {![::nsf::existsvar $i $att]} { if {[string match {*\[*\]*} $default]} { set value [::nsf::dispatch $i -objscope ::eval subst $default] @@ -741,8 +741,8 @@ ObjectParameterSlot method unknown {method args} { set methods [list] - foreach m [::nsf::dispatch [::nsf::current object] ::nsf::cmd::ObjectInfo::lookupmethods] { - if {[::nsf::dispatch Object ::nsf::cmd::ObjectInfo::lookupmethods $m] ne ""} continue + foreach m [::nsf::dispatch [::nsf::current object] ::nsf::methods::object::info::lookupmethods] { + if {[::nsf::dispatch Object ::nsf::methods::object::info::lookupmethods $m] ne ""} continue if {[string match __* $m]} continue lappend methods $m } @@ -875,11 +875,11 @@ proc ::nsf::parametersFromSlots {obj} { set parameterdefinitions [list] - foreach slot [::nsf::dispatch $obj ::nsf::cmd::ObjectInfo::lookupslots -type ::nx::Slot] { + foreach slot [::nsf::dispatch $obj ::nsf::methods::object::info::lookupslots -type ::nx::Slot] { # Skip some slots for xotcl; # TODO: maybe different parameterFromSlots for xotcl? if {[::nsf::is class ::xotcl::Object] - && [::nsf::dispatch $obj ::nsf::cmd::ObjectInfo::hastype ::xotcl::Object] && + && [::nsf::dispatch $obj ::nsf::methods::object::info::hastype ::xotcl::Object] && ([$slot name] eq "mixin" || [$slot name] eq "filter") } continue array set "" [$slot toParameterSyntax] @@ -1137,12 +1137,12 @@ set object [expr {${:per-object} ? {object} : {}}] if {${:per-object}} { set perObject -per-object - set infokind Object + set infokind object } else { set perObject "" - set infokind Class + set infokind class } - if {[::nsf::dispatch ${:domain} ::nsf::cmd::${infokind}Info::method handle ${:name}] ne ""} { + if {[::nsf::dispatch ${:domain} ::nsf::methods::${infokind}::info::method handle ${:name}] ne ""} { #puts stderr "OPTIMIZER RESETTING ${:domain} slot ${:name}" ::nsf::forward ${:domain} {*}$perObject ${:name} \ ${:manager} \ @@ -1228,14 +1228,14 @@ Slot method type=baseclass {name value} { # note, that we cannot use "nsf::is baseclass ..." here, since nsf::is call this converter - if {![::nsf::isobject $value] || ![::nsf::dispatch $value ::nsf::cmd::ObjectInfo::is baseclass]} { + if {![::nsf::isobject $value] || ![::nsf::dispatch $value ::nsf::methods::object::info::is baseclass]} { error "expected baseclass but got \"$value\" for parameter $name" } return $value } Slot method type=metaclass {name value} { - if {![::nsf::isobject $value] || ![::nsf::dispatch $value ::nsf::cmd::ObjectInfo::is metaclass]} { + if {![::nsf::isobject $value] || ![::nsf::dispatch $value ::nsf::methods::object::info::is metaclass]} { error "expected metaclass but got \"$value\" for parameter $name" } return $value @@ -1316,7 +1316,7 @@ #puts stderr "COPY makeTargetList $t target= ${:targetList}" # if it is an object without namespace, it is a leaf if {[::nsf::isobject $t]} { - if {[::nsf::dispatch $t ::nsf::cmd::ObjectInfo::hasnamespace]} { + if {[::nsf::dispatch $t ::nsf::methods::object::info::hasnamespace]} { # make target list from all children set children [$t info children] } else { @@ -1375,20 +1375,20 @@ ::nsf::relation $obj object-filter [::nsf::relation $origin object-filter] ::nsf::relation $obj object-mixin [::nsf::relation $origin object-mixin] # reused in XOTcl, no "require" there, so use nsf primitiva - if {[::nsf::dispatch $origin ::nsf::cmd::ObjectInfo::hasnamespace]} { + if {[::nsf::dispatch $origin ::nsf::methods::object::info::hasnamespace]} { ::nsf::dispatch $obj ::nsf::cmd::Object::require_namespace } } else { namespace eval $dest {} } :copyNSVarsAndCmds $origin $dest - foreach i [$origin ::nsf::cmd::ObjectInfo::forward] { - ::nsf::forward $dest -per-object $i {*}[$origin ::nsf::cmd::ObjectInfo::forward -definition $i] + foreach i [$origin ::nsf::methods::object::info::forward] { + ::nsf::forward $dest -per-object $i {*}[$origin ::nsf::methods::object::info::forward -definition $i] } if {[::nsf::is class $origin]} { - foreach i [$origin ::nsf::cmd::ClassInfo::forward] { - ::nsf::forward $dest $i {*}[$origin ::nsf::cmd::ClassInfo::forward -definition $i] + foreach i [$origin ::nsf::methods::class::info::forward] { + ::nsf::forward $dest $i {*}[$origin ::nsf::methods::class::info::forward -definition $i] } } set traces [list] Index: library/serialize/serializer.tcl =================================================================== diff -u -r29ea21bd3f28ea7effaca6039e59a8a3499f8fd8 -r42921ea037c4334cb6ecc565978330f9d8e902ec --- library/serialize/serializer.tcl (.../serializer.tcl) (revision 29ea21bd3f28ea7effaca6039e59a8a3499f8fd8) +++ library/serialize/serializer.tcl (.../serializer.tcl) (revision 42921ea037c4334cb6ecc565978330f9d8e902ec) @@ -467,7 +467,7 @@ :public method registerSerializer {s instances} { # Communicate responsibility to serializer object $s foreach i $instances { - if {![::nsf::dispatch $i ::nsf::cmd::ObjectInfo::hastype ${:rootClass}]} continue + if {![::nsf::dispatch $i ::nsf::methods::object::info::hastype ${:rootClass}]} continue $s setObjectSystemSerializer $i [::nsf::current object] } } @@ -496,14 +496,14 @@ foreach {o p m} $k break if {![::nsf::isobject $o]} { puts stderr "Warning: $o is not an object" - } elseif {[::nsf::dispatch $o ::nsf::cmd::ObjectInfo::hastype ${:rootClass}]} { + } elseif {[::nsf::dispatch $o ::nsf::methods::object::info::hastype ${:rootClass}]} { set :exportMethods($k) 1 } } foreach o [Serializer exportedObjects] { if {![::nsf::isobject $o]} { puts stderr "Warning: $o is not an object" - } elseif {[nsf::dispatch $o ::nsf::cmd::ObjectInfo::hastype ${:rootClass}]} { + } elseif {[nsf::dispatch $o ::nsf::methods::object::info::hastype ${:rootClass}]} { set :exportObjects($o) 1 } } @@ -516,7 +516,7 @@ ############################### :method classify {o} { - if {[::nsf::dispatch $o ::nsf::cmd::ObjectInfo::hastype ${:rootMetaClass}]} \ + if {[::nsf::dispatch $o ::nsf::methods::object::info::hastype ${:rootMetaClass}]} \ {return Class} {return Object} } @@ -668,7 +668,7 @@ [::nsf::dispatch $o -objscope ::nsf::current object]] append cmd " -noinit\n" - foreach i [lsort [$o ::nsf::cmd::ObjectInfo::methods]] { + foreach i [lsort [$o ::nsf::methods::object::info::methods]] { append cmd [:method-serialize $o $i "object"] "\n" } append cmd \ @@ -693,7 +693,7 @@ :method Class-serialize {o s} { set cmd [:Object-serialize $o $s] - foreach i [lsort [$o ::nsf::cmd::ClassInfo::methods]] { + foreach i [lsort [$o ::nsf::methods::class::info::methods]] { append cmd [:method-serialize $o $i ""] "\n" } append cmd \ @@ -798,13 +798,13 @@ # slots needs to be initialized when optimized, since # parametercmds are not serialized append cmd " -noinit\n" - foreach i [$o ::nsf::cmd::ObjectInfo::methods -methodtype scripted] { + foreach i [$o ::nsf::methods::object::info::methods -methodtype scripted] { append cmd [:method-serialize $o $i ""] "\n" } - foreach i [$o ::nsf::cmd::ObjectInfo::methods -methodtype forward] { + foreach i [$o ::nsf::methods::object::info::methods -methodtype forward] { append cmd [concat [list $o] forward $i [$o info forward -definition $i]] "\n" } - foreach i [$o ::nsf::cmd::ObjectInfo::methods -methodtype setter] { + foreach i [$o ::nsf::methods::object::info::methods -methodtype setter] { append cmd [list $o parametercmd $i] "\n" } append cmd \ @@ -833,8 +833,8 @@ append cmd [list $o instparametercmd $i] "\n" } # provide limited support for exporting aliases for XOTcl objects - foreach i [$o ::nsf::cmd::ClassInfo::methods -methodtype alias] { - set xotcl2Def [$o ::nsf::cmd::ClassInfo::method definition $i] + foreach i [$o ::nsf::methods::class::info::methods -methodtype alias] { + set xotcl2Def [$o ::nsf::methods::class::info::method definition $i] set objscope [lindex $xotcl2Def end-2] set methodName [lindex $xotcl2Def end-1] set cmdName [lindex $xotcl2Def end] Index: library/tcl-cool/tcl-cool.tcl =================================================================== diff -u -r8ee718fe7e27c3df71bc659f3261710a4aaf5805 -r42921ea037c4334cb6ecc565978330f9d8e902ec --- library/tcl-cool/tcl-cool.tcl (.../tcl-cool.tcl) (revision 8ee718fe7e27c3df71bc659f3261710a4aaf5805) +++ library/tcl-cool/tcl-cool.tcl (.../tcl-cool.tcl) (revision 42921ea037c4334cb6ecc565978330f9d8e902ec) @@ -106,7 +106,7 @@ # ::nsf::alias object variable ::nsf::cmd::Object::instvar ::nsf::forward object forward ::nsf::forward %self -per-object - ::nsf::alias object methods ::nsf::cmd::ObjectInfo::lookupmethods + ::nsf::alias object methods ::nsf::methods::object::info::lookupmethods # # The method "create" defines, what happens, when a class or object Index: library/xotcl/library/xotcl2.tcl =================================================================== diff -u -rb19a6e9aa168b386cf12ae0f66998c7a2a9ce495 -r42921ea037c4334cb6ecc565978330f9d8e902ec --- library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision b19a6e9aa168b386cf12ae0f66998c7a2a9ce495) +++ library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision 42921ea037c4334cb6ecc565978330f9d8e902ec) @@ -396,42 +396,42 @@ # TODO mark all absolete calls at least as deprecated in library # - proc ::xotcl::info_args {allocation o method} { + proc ::xotcl::info_args {scope o method} { set result [list] foreach \ - argName [$o ::nsf::cmd::${allocation}Info::method args $method] \ - flag [$o ::nsf::cmd::${allocation}Info::method parameter $method] { + argName [$o ::nsf::methods::${scope}::info::method args $method] \ + flag [$o ::nsf::methods::${scope}::info::method parameter $method] { if {[string match -* $flag]} continue lappend result $argName } #puts stderr "+++ get ${inst}args for $o $method => $result" return $result } - proc ::xotcl::info_nonposargs {allocation o method} { + proc ::xotcl::info_nonposargs {scope o method} { set result [list] - foreach flag [$o ::nsf::cmd::${allocation}Info::method parameter $method] { + foreach flag [$o ::nsf::methods::${scope}::info::method parameter $method] { if {![string match -* $flag]} continue lappend result $flag } #puts stderr "+++ get ${inst}nonposargs for $o $method => $result" return $result } - proc ::xotcl::info_default {allocation o method arg varName} { + proc ::xotcl::info_default {scope o method arg varName} { foreach \ - argName [$o ::nsf::cmd::${allocation}Info::method args $method] \ - flag [$o ::nsf::cmd::${allocation}Info::method parameter $method] { + argName [$o ::nsf::methods::${scope}::info::method args $method] \ + flag [$o ::nsf::methods::${scope}::info::method parameter $method] { if {$argName eq $arg} { # upvar 2 $varName default # use "my" here to avoid surprises with aliases or interceptors $o upvar $varName default #puts "--- info_default var '$varName' level=[info level]" if {[llength $flag] == 2} { set default [lindex $flag 1] - #puts stderr "--- get $allocation default for $o $method $arg => $default" + #puts stderr "--- get $scope default for $o $method $arg => $default" return 1 } - #puts stderr "--- get $allocation default for $o $method $arg fails" + #puts stderr "--- get $scope default for $o $method $arg fails" set default "" return 0 } @@ -443,17 +443,17 @@ Object instproc alias {name cmd} {::nsf::alias [self] $name $cmd} objectInfo eval { - :proc args {method} {::xotcl::info_args Object [self] $method} - :proc body {methodName} {my ::nsf::cmd::ObjectInfo::method body $methodName} + :proc args {method} {::xotcl::info_args object [self] $method} + :proc body {methodName} {my ::nsf::methods::object::info::method body $methodName} :proc check {} {::xotcl::checkoption_internal_to_xotcl1 [::nsf::assertion [self] check]} - :alias class ::nsf::cmd::ObjectInfo::class - :alias children ::nsf::cmd::ObjectInfo::children + :alias class ::nsf::methods::object::info::class + :alias children ::nsf::methods::object::info::children :proc commands {{pattern ""}} { - my ::nsf::cmd::ObjectInfo::methods -methodtype all {*}$pattern + my ::nsf::methods::object::info::methods -methodtype all {*}$pattern } :proc default {method arg varName} { # pass varName to be able produce the right error message - set r [::xotcl::info_default Object [self] $method $arg $varName] + set r [::xotcl::info_default object [self] $method $arg $varName] #puts "--- var '$varName' level=[info level]" return $r } @@ -462,23 +462,23 @@ set patternArg [expr {[info exists pattern] ? [list $pattern] : ""}] if {$order && !$guards} { set def [::nsf::dispatch [::nsf::current object] \ - ::nsf::cmd::ObjectInfo::filtermethods -order \ + ::nsf::methods::object::info::filtermethods -order \ {*}$guardsFlag \ {*}$patternArg] set def [method_handles_to_xotcl $def] } else { set def [::nsf::dispatch [::nsf::current object] \ - ::nsf::cmd::ObjectInfo::filtermethods \ + ::nsf::methods::object::info::filtermethods \ {*}$guardsFlag \ {*}$patternArg] } #puts stderr " => $def" return $def } - :alias filterguard ::nsf::cmd::ObjectInfo::filterguard - :alias forward ::nsf::cmd::ObjectInfo::forward - :alias hasnamespace ::nsf::cmd::ObjectInfo::hasnamespace + :alias filterguard ::nsf::methods::object::info::filterguard + :alias forward ::nsf::methods::object::info::forward + :alias hasnamespace ::nsf::methods::object::info::hasnamespace :proc invar {} {::nsf::assertion [self] object-invar} :proc methods { @@ -487,82 +487,82 @@ set methodtype all if {$nocmds} {set methodtype scripted} if {$noprocs} {if {$nocmds} {return ""}; set methodtype builtin} - set cmd [list ::nsf::cmd::ObjectInfo::lookupmethods -methodtype $methodtype] + set cmd [list ::nsf::methods::object::info::lookupmethods -methodtype $methodtype] if {$incontext} {lappend cmd -incontext} if {[info exists pattern]} {lappend cmd $pattern} my {*}$cmd } - :alias mixin ::nsf::cmd::ObjectInfo::mixinclasses - :alias mixinguard ::nsf::cmd::ObjectInfo::mixinguard - :proc nonposargs {method} {::xotcl::info_nonposargs Object [self] $method} + :alias mixin ::nsf::methods::object::info::mixinclasses + :alias mixinguard ::nsf::methods::object::info::mixinguard + :proc nonposargs {method} {::xotcl::info_nonposargs object [self] $method} :proc parametercmd {name} {::nsf::classes::nx::Object::setter [self] $name} - :alias parent ::nsf::cmd::ObjectInfo::parent - :proc post {methodName} {my ::nsf::cmd::ObjectInfo::method post $methodName} - :proc pre {methodName} {my ::nsf::cmd::ObjectInfo::method pre $methodName} + :alias parent ::nsf::methods::object::info::parent + :proc post {methodName} {my ::nsf::methods::object::info::method post $methodName} + :proc pre {methodName} {my ::nsf::methods::object::info::method pre $methodName} :proc procs {{pattern ""}} { - my ::nsf::cmd::ObjectInfo::methods -methodtype scripted {*}$pattern + my ::nsf::methods::object::info::methods -methodtype scripted {*}$pattern } - :alias precedence ::nsf::cmd::ObjectInfo::precedence - :alias vars ::nsf::cmd::ObjectInfo::vars + :alias precedence ::nsf::methods::object::info::precedence + :alias vars ::nsf::methods::object::info::vars } # # copy all methods from Object.info to Class.info # - foreach m [objectInfo ::nsf::cmd::ObjectInfo::methods] { - ::nsf::alias classInfo $m [objectInfo ::nsf::cmd::ObjectInfo::method handle $m] + foreach m [objectInfo ::nsf::methods::object::info::methods] { + ::nsf::alias classInfo $m [objectInfo ::nsf::methods::object::info::method handle $m] } classInfo eval { - :alias classchildren ::nsf::cmd::ObjectInfo::children - :alias classparent ::nsf::cmd::ObjectInfo::parent + :alias classchildren ::nsf::methods::object::info::children + :alias classparent ::nsf::methods::object::info::parent :proc default {method arg varName} { - set r [::xotcl::info_default Object [self] $method $arg $varName] + set r [::xotcl::info_default object [self] $method $arg $varName] #puts "--- var '$varName' level=[info level]" return $r } - :alias heritage ::nsf::cmd::ClassInfo::heritage - :alias instances ::nsf::cmd::ClassInfo::instances + :alias heritage ::nsf::methods::class::info::heritage + :alias instances ::nsf::methods::class::info::instances - :proc instargs {method} {::xotcl::info_args Class [self] $method} - :proc instbody {methodName} {my ::nsf::cmd::ClassInfo::method body $methodName} - :proc instcommands {{pattern ""}} {my ::nsf::cmd::ClassInfo::methods {*}$pattern} + :proc instargs {method} {::xotcl::info_args class [self] $method} + :proc instbody {methodName} {my ::nsf::methods::class::info::method body $methodName} + :proc instcommands {{pattern ""}} {my ::nsf::methods::class::info::methods {*}$pattern} :proc instdefault {method arg varName} { - set r [::xotcl::info_default Class [self] $method $arg $varName] + set r [::xotcl::info_default class [self] $method $arg $varName] return $r } - :alias instfilter ::nsf::cmd::ClassInfo::filtermethods - :alias instfilterguard ::nsf::cmd::ClassInfo::filterguard - :alias instforward ::nsf::cmd::ClassInfo::forward + :alias instfilter ::nsf::methods::class::info::filtermethods + :alias instfilterguard ::nsf::methods::class::info::filterguard + :alias instforward ::nsf::methods::class::info::forward :proc instinvar {} {::nsf::assertion [self] class-invar} - :alias instmixin ::nsf::cmd::ClassInfo::mixinclasses - :alias instmixinguard ::nsf::cmd::ClassInfo::mixinguard + :alias instmixin ::nsf::methods::class::info::mixinclasses + :alias instmixinguard ::nsf::methods::class::info::mixinguard :proc instmixinof {-closure {pattern ""}} { - my ::nsf::cmd::ClassInfo::mixinof -scope class \ + my ::nsf::methods::class::info::mixinof -scope class \ {*}[expr {$closure ? "-closure" : ""}] \ {*}$pattern } :proc instparametercmd {{pattern ""}} { - my ::nsf::cmd::ClassInfo::methods -methodtype setter {*}$pattern + my ::nsf::methods::class::info::methods -methodtype setter {*}$pattern } - :proc instnonposargs {method} {::xotcl::info_nonposargs Class [self] $method} - :proc instpost {methodName} {my ::nsf::cmd::ClassInfo::method postcondition $methodName} - :proc instpre {methodName} {my ::nsf::cmd::ClassInfo::method precondition $methodName} + :proc instnonposargs {method} {::xotcl::info_nonposargs class [self] $method} + :proc instpost {methodName} {my ::nsf::methods::class::info::method postcondition $methodName} + :proc instpre {methodName} {my ::nsf::methods::class::info::method precondition $methodName} :proc instprocs {{pattern ""}} { - my ::nsf::cmd::ClassInfo::methods -methodtype scripted {*}$pattern + my ::nsf::methods::class::info::methods -methodtype scripted {*}$pattern } :proc mixinof {-closure:switch {pattern ""}} { - my ::nsf::cmd::ClassInfo::mixinof -scope object \ + my ::nsf::methods::class::info::mixinof -scope object \ {*}[expr {$closure ? "-closure" : ""}] \ {*}$pattern } :alias parameter ::nx::Class::slot::__info::attributes :alias slots ::nx::Object::slot::__info::slots - :alias subclass ::nsf::cmd::ClassInfo::subclass - :alias superclass ::nsf::cmd::ClassInfo::superclass + :alias subclass ::nsf::methods::class::info::subclass + :alias superclass ::nsf::methods::class::info::superclass } # define "info info" @@ -590,10 +590,10 @@ Object instproc ismetaclass {{class:substdefault "[self]"}} {::nsf::is metaclass $class} Object instproc ismixin {class} { expr {[::nsf::is class $class] && - [my ::nsf::cmd::ObjectInfo::hasmixin $class]}} + [my ::nsf::methods::object::info::hasmixin $class]}} Object instproc istype {class} { expr {[::nsf::is class $class] && - [::nsf::dispatch [self] ::nsf::cmd::ObjectInfo::hastype $class]} + [::nsf::dispatch [self] ::nsf::methods::object::info::hastype $class]} } # definitin of "contains", based on nx @@ -685,17 +685,17 @@ # support for XOTcl specific convenience routines Object instproc hasclass cl { if {![::nsf::is class $cl]} {return 0} - if {[::nsf::dispatch [self] ::nsf::cmd::ObjectInfo::hasmixin $cl]} {return 1} - ::nsf::dispatch [self] ::nsf::cmd::ObjectInfo::hastype $cl + if {[::nsf::dispatch [self] ::nsf::methods::object::info::hasmixin $cl]} {return 1} + ::nsf::dispatch [self] ::nsf::methods::object::info::hastype $cl } Object instproc filtersearch {filter} { set handle [::nsf::dispatch [::nsf::current object] \ - ::nsf::cmd::ObjectInfo::lookupfilter $filter] + ::nsf::methods::object::info::lookupfilter $filter] return [method_handle_to_xotcl $handle] } Object instproc procsearch {name} { set handle [::nsf::dispatch [::nsf::current object] \ - ::nsf::cmd::ObjectInfo::lookupmethod $name] + ::nsf::methods::object::info::lookupmethod $name] return [method_handle_to_xotcl $handle] } Class instproc allinstances {} { Index: library/xotcl/tests/testx.xotcl =================================================================== diff -u -rb19a6e9aa168b386cf12ae0f66998c7a2a9ce495 -r42921ea037c4334cb6ecc565978330f9d8e902ec --- library/xotcl/tests/testx.xotcl (.../testx.xotcl) (revision b19a6e9aa168b386cf12ae0f66998c7a2a9ce495) +++ library/xotcl/tests/testx.xotcl (.../testx.xotcl) (revision 42921ea037c4334cb6ecc565978330f9d8e902ec) @@ -1,5 +1,5 @@ # -*- Tcl -*- -package require XOTcl; namespace import ::xotcl::* +package require XOTcl; namespace import -force ::xotcl::* proc ::errorCheck {got expected msg} { nsf::__db_run_assertions Index: tests/info-method.tcl =================================================================== diff -u -r8ee718fe7e27c3df71bc659f3261710a4aaf5805 -r42921ea037c4334cb6ecc565978330f9d8e902ec --- tests/info-method.tcl (.../info-method.tcl) (revision 8ee718fe7e27c3df71bc659f3261710a4aaf5805) +++ tests/info-method.tcl (.../info-method.tcl) (revision 42921ea037c4334cb6ecc565978330f9d8e902ec) @@ -276,15 +276,15 @@ # query definition on submethod of class ? {::nx::Object info method definition "info lookup methods"} \ - {::nx::Object alias {info lookup methods} ::nsf::cmd::ObjectInfo::lookupmethods} + {::nx::Object alias {info lookup methods} ::nsf::methods::object::info::lookupmethods} # query definition on submethod of class with handle ? {o info method definition "::nsf::classes::nx::Object::info lookup methods"} \ - {::nx::Object alias {info lookup methods} ::nsf::cmd::ObjectInfo::lookupmethods} + {::nx::Object alias {info lookup methods} ::nsf::methods::object::info::lookupmethods} # query definition on handle of ensemble object of class ? {o info method definition "::nx::Object::slot::__info::lookup::methods"} \ - {::nx::Object::slot::__info::lookup alias methods ::nsf::cmd::ObjectInfo::lookupmethods} + {::nx::Object::slot::__info::lookup alias methods ::nsf::methods::object::info::lookupmethods} ? {lsort [o info method submethods dummy]} "" ? {lsort [o info method submethods foo]} "a b" Index: tests/parameters.tcl =================================================================== diff -u -rd1ed482555d4d28dbb41fb9ca2723eabb5e01221 -r42921ea037c4334cb6ecc565978330f9d8e902ec --- tests/parameters.tcl (.../parameters.tcl) (revision d1ed482555d4d28dbb41fb9ca2723eabb5e01221) +++ tests/parameters.tcl (.../parameters.tcl) (revision 42921ea037c4334cb6ecc565978330f9d8e902ec) @@ -54,8 +54,8 @@ ? {c1 info has type C} 1 ? {c1 info has type C1} {expected class but got "C1" for parameter class} - ? {c1 ::nsf::cmd::ObjectInfo::hastype C} 1 - ? {::nsf::dispatch c1 ::nsf::cmd::ObjectInfo::hastype C} 1 + ? {c1 ::nsf::methods::object::info::hastype C} 1 + ? {::nsf::dispatch c1 ::nsf::methods::object::info::hastype C} 1 ? {::nsf::is object o1} 1 ? {::nsf::is object o100} 0 @@ -1193,9 +1193,9 @@ Test case checktype { nx::Object create o { - :method f01 {} {::nsf::dispatch o ::nsf::cmd::ObjectInfo::hastype ::nx::Object} - :method f02 {} {::nsf::dispatch o ::nsf::cmd::ObjectInfo::hastype nx::Object} - :method f03 {} {::nsf::dispatch o ::nsf::cmd::ObjectInfo::hastype Object} + :method f01 {} {::nsf::dispatch o ::nsf::methods::object::info::hastype ::nx::Object} + :method f02 {} {::nsf::dispatch o ::nsf::methods::object::info::hastype nx::Object} + :method f03 {} {::nsf::dispatch o ::nsf::methods::object::info::hastype Object} :method f11 {} {::nsf::is object,type=::nx::Object o} :method f12 {} {::nsf::is object,type=nx::Object o} @@ -1217,18 +1217,18 @@ namespace eval foo { nx::Class create C { :create c1 - :method f21 {} {::nsf::dispatch c1 ::nsf::cmd::ObjectInfo::hastype Object} - :method f22 {} {::nsf::dispatch c1 ::nsf::cmd::ObjectInfo::hastype C} + :method f21 {} {::nsf::dispatch c1 ::nsf::methods::object::info::hastype Object} + :method f22 {} {::nsf::dispatch c1 ::nsf::methods::object::info::hastype C} :method f31 {} {::nsf::is object,type=Object c1} :method f32 {} {::nsf::is object,type=C c1} } nx::Object create o { - :method f01 {} {::nsf::dispatch c1 ::nsf::cmd::ObjectInfo::hastype ::nx::Object} - :method f02 {} {::nsf::dispatch c1 ::nsf::cmd::ObjectInfo::hastype nx::Object} - :method f03 {} {::nsf::dispatch c1 ::nsf::cmd::ObjectInfo::hastype Object} - :method f04 {} {::nsf::dispatch c1 ::nsf::cmd::ObjectInfo::hastype foo::C} - :method f05 {} {::nsf::dispatch c1 ::nsf::cmd::ObjectInfo::hastype C} + :method f01 {} {::nsf::dispatch c1 ::nsf::methods::object::info::hastype ::nx::Object} + :method f02 {} {::nsf::dispatch c1 ::nsf::methods::object::info::hastype nx::Object} + :method f03 {} {::nsf::dispatch c1 ::nsf::methods::object::info::hastype Object} + :method f04 {} {::nsf::dispatch c1 ::nsf::methods::object::info::hastype foo::C} + :method f05 {} {::nsf::dispatch c1 ::nsf::methods::object::info::hastype C} :method f11 {} {::nsf::is object,type=::nx::Object c1} :method f12 {} {::nsf::is object,type=nx::Object c1}