Index: TODO =================================================================== diff -u -r18122dd21b99cf0d5b4cd01635048641a23aa051 -r1008a85cf8fe5d95365568f6c765a83389028ff2 --- TODO (.../TODO) (revision 18122dd21b99cf0d5b4cd01635048641a23aa051) +++ TODO (.../TODO) (revision 1008a85cf8fe5d95365568f6c765a83389028ff2) @@ -1226,9 +1226,12 @@ - introduced ::nsf::isobject - replaced in all scripts "::nsf::objectproperty ... object" by isobject +- removed "infoObjectMethod" and "infoClassMethod" +- replaced ::nsf::cmd::ClassInfo2 by ::nsf::cmd::ClassInfo +- replaced ::nsf::cmd::ObjectInfo2 by ::nsf::cmd::ObjectInfo + TODO: - reflect changes in /is/objectproperty/info has/info is/ in migration guide -- rename ObjectInfo2 & ClassInfo2 - check equivalence of the following two commands in respect to fully-qualified names ::nsf::dispatch $obj ::nsf::cmd::ObjectInfo2::hastype $class Index: generic/gentclAPI.decls =================================================================== diff -u -r18122dd21b99cf0d5b4cd01635048641a23aa051 -r1008a85cf8fe5d95365568f6c765a83389028ff2 --- generic/gentclAPI.decls (.../gentclAPI.decls) (revision 18122dd21b99cf0d5b4cd01635048641a23aa051) +++ generic/gentclAPI.decls (.../gentclAPI.decls) (revision 1008a85cf8fe5d95365568f6c765a83389028ff2) @@ -8,12 +8,10 @@ array set ns { xotclCmd "::nsf" objectMethod "::nsf::cmd::Object" - objectInfoMethod "::nsf::cmd::ObjectInfo2" + objectInfoMethod "::nsf::cmd::ObjectInfo" classMethod "::nsf::cmd::Class" - classInfoMethod "::nsf::cmd::ClassInfo2" + classInfoMethod "::nsf::cmd::ClassInfo" checkMethod "::nsf::cmd::ParameterType" - infoClassMethod "::nsf::cmd::ClassInfo" - infoObjectMethod "::nsf::cmd::ObjectInfo" } # Index: generic/gentclAPI.tcl =================================================================== diff -u -ra47d62c39a33a69e4550eab30369560d56baf574 -r1008a85cf8fe5d95365568f6c765a83389028ff2 --- generic/gentclAPI.tcl (.../gentclAPI.tcl) (revision a47d62c39a33a69e4550eab30369560d56baf574) +++ generic/gentclAPI.tcl (.../gentclAPI.tcl) (revision 1008a85cf8fe5d95365568f6c765a83389028ff2) @@ -334,12 +334,6 @@ set ::definitions($d(methodType)-$d(implementation)-$d(methodName)) [array get d] } -proc infoClassMethod {methodName implementation parameterDefinitions} { - methodDefinition $methodName infoClassMethod $implementation $parameterDefinitions -} -proc infoObjectMethod {methodName implementation parameterDefinitions} { - methodDefinition $methodName infoObjectMethod $implementation $parameterDefinitions -} proc checkMethod {methodName implementation parameterDefinitions} { methodDefinition type=$methodName checkMethod $implementation $parameterDefinitions } Index: generic/tclAPI.h =================================================================== diff -u -r18122dd21b99cf0d5b4cd01635048641a23aa051 -r1008a85cf8fe5d95365568f6c765a83389028ff2 --- generic/tclAPI.h (.../tclAPI.h) (revision 18122dd21b99cf0d5b4cd01635048641a23aa051) +++ generic/tclAPI.h (.../tclAPI.h) (revision 1008a85cf8fe5d95365568f6c765a83389028ff2) @@ -140,11 +140,9 @@ static CONST char *method_command_namespace_names[] = { "::nsf::cmd::ObjectInfo", - "::nsf::cmd::ObjectInfo2", "::nsf::cmd::Object", - "::nsf::cmd::ClassInfo", "::nsf::cmd::ParameterType", - "::nsf::cmd::ClassInfo2", + "::nsf::cmd::ClassInfo", "::nsf::cmd::Class" }; static int XOTclCAllocMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); @@ -1993,56 +1991,56 @@ {"name", 1, 0, convertToTclobj}, {"args", 0, 0, convertToNothing}} }, -{"::nsf::cmd::ClassInfo2::filterguard", XOTclClassInfoFilterguardMethodStub, 1, { +{"::nsf::cmd::ClassInfo::filterguard", XOTclClassInfoFilterguardMethodStub, 1, { {"filter", 1, 0, convertToString}} }, -{"::nsf::cmd::ClassInfo2::filtermethods", XOTclClassInfoFiltermethodsMethodStub, 2, { +{"::nsf::cmd::ClassInfo::filtermethods", XOTclClassInfoFiltermethodsMethodStub, 2, { {"-guards", 0, 0, convertToString}, {"pattern", 0, 0, convertToString}} }, -{"::nsf::cmd::ClassInfo2::forward", XOTclClassInfoForwardMethodStub, 2, { +{"::nsf::cmd::ClassInfo::forward", XOTclClassInfoForwardMethodStub, 2, { {"-definition", 0, 0, convertToString}, {"name", 0, 0, convertToString}} }, -{"::nsf::cmd::ClassInfo2::heritage", XOTclClassInfoHeritageMethodStub, 1, { +{"::nsf::cmd::ClassInfo::heritage", XOTclClassInfoHeritageMethodStub, 1, { {"pattern", 0, 0, convertToString}} }, -{"::nsf::cmd::ClassInfo2::instances", XOTclClassInfoInstancesMethodStub, 2, { +{"::nsf::cmd::ClassInfo::instances", XOTclClassInfoInstancesMethodStub, 2, { {"-closure", 0, 0, convertToString}, {"pattern", 0, 0, convertToObjpattern}} }, -{"::nsf::cmd::ClassInfo2::method", XOTclClassInfoMethodMethodStub, 2, { +{"::nsf::cmd::ClassInfo::method", XOTclClassInfoMethodMethodStub, 2, { {"infomethodsubcmd", 0, 0, convertToInfomethodsubcmd}, {"name", 0, 0, convertToString}} }, -{"::nsf::cmd::ClassInfo2::methods", XOTclClassInfoMethodsMethodStub, 5, { +{"::nsf::cmd::ClassInfo::methods", XOTclClassInfoMethodsMethodStub, 5, { {"-methodtype", 0, 1, convertToMethodtype}, {"-callprotection", 0, 1, convertToCallprotection}, {"-nomixins", 0, 0, convertToString}, {"-incontext", 0, 0, convertToString}, {"pattern", 0, 0, convertToString}} }, -{"::nsf::cmd::ClassInfo2::mixinof", XOTclClassInfoMixinOfMethodStub, 3, { +{"::nsf::cmd::ClassInfo::mixinof", XOTclClassInfoMixinOfMethodStub, 3, { {"-closure", 0, 0, convertToString}, {"-scope", 0, 1, convertToScope}, {"pattern", 0, 0, convertToObjpattern}} }, -{"::nsf::cmd::ClassInfo2::mixinclasses", XOTclClassInfoMixinclassesMethodStub, 3, { +{"::nsf::cmd::ClassInfo::mixinclasses", XOTclClassInfoMixinclassesMethodStub, 3, { {"-closure", 0, 0, convertToString}, {"-guards", 0, 0, convertToString}, {"pattern", 0, 0, convertToObjpattern}} }, -{"::nsf::cmd::ClassInfo2::mixinguard", XOTclClassInfoMixinguardMethodStub, 1, { +{"::nsf::cmd::ClassInfo::mixinguard", XOTclClassInfoMixinguardMethodStub, 1, { {"mixin", 1, 0, convertToString}} }, -{"::nsf::cmd::ClassInfo2::slots", XOTclClassInfoSlotsMethodStub, 0, { +{"::nsf::cmd::ClassInfo::slots", XOTclClassInfoSlotsMethodStub, 0, { } }, -{"::nsf::cmd::ClassInfo2::subclass", XOTclClassInfoSubclassMethodStub, 2, { +{"::nsf::cmd::ClassInfo::subclass", XOTclClassInfoSubclassMethodStub, 2, { {"-closure", 0, 0, convertToString}, {"pattern", 0, 0, convertToObjpattern}} }, -{"::nsf::cmd::ClassInfo2::superclass", XOTclClassInfoSuperclassMethodStub, 2, { +{"::nsf::cmd::ClassInfo::superclass", XOTclClassInfoSuperclassMethodStub, 2, { {"-closure", 0, 0, convertToString}, {"pattern", 0, 0, convertToTclobj}} }, @@ -2095,7 +2093,7 @@ {"::nsf::cmd::Object::vwait", XOTclOVwaitMethodStub, 1, { {"varname", 1, 0, convertToString}} }, -{"::nsf::cmd::ObjectInfo2::callable", XOTclObjInfoCallableMethodStub, 7, { +{"::nsf::cmd::ObjectInfo::callable", XOTclObjInfoCallableMethodStub, 7, { {"infocallablesubcmd", 1, 1, convertToInfocallablesubcmd}, {"-methodtype", 0, 1, convertToMethodtype}, {"-callprotection", 0, 1, convertToCallprotection}, @@ -2104,63 +2102,63 @@ {"-incontext", 0, 0, convertToString}, {"pattern", 0, 0, convertToString}} }, -{"::nsf::cmd::ObjectInfo2::children", XOTclObjInfoChildrenMethodStub, 1, { +{"::nsf::cmd::ObjectInfo::children", XOTclObjInfoChildrenMethodStub, 1, { {"pattern", 0, 0, convertToString}} }, -{"::nsf::cmd::ObjectInfo2::class", XOTclObjInfoClassMethodStub, 0, { +{"::nsf::cmd::ObjectInfo::class", XOTclObjInfoClassMethodStub, 0, { } }, -{"::nsf::cmd::ObjectInfo2::filterguard", XOTclObjInfoFilterguardMethodStub, 1, { +{"::nsf::cmd::ObjectInfo::filterguard", XOTclObjInfoFilterguardMethodStub, 1, { {"filter", 1, 0, convertToString}} }, -{"::nsf::cmd::ObjectInfo2::filtermethods", XOTclObjInfoFiltermethodsMethodStub, 3, { +{"::nsf::cmd::ObjectInfo::filtermethods", XOTclObjInfoFiltermethodsMethodStub, 3, { {"-guards", 0, 0, convertToString}, {"-order", 0, 0, convertToString}, {"pattern", 0, 0, convertToString}} }, -{"::nsf::cmd::ObjectInfo2::forward", XOTclObjInfoForwardMethodStub, 2, { +{"::nsf::cmd::ObjectInfo::forward", XOTclObjInfoForwardMethodStub, 2, { {"-definition", 0, 0, convertToString}, {"name", 0, 0, convertToString}} }, -{"::nsf::cmd::ObjectInfo2::hasmixin", XOTclObjInfoHasMixinMethodStub, 1, { +{"::nsf::cmd::ObjectInfo::hasmixin", XOTclObjInfoHasMixinMethodStub, 1, { {"class", 0, 0, convertToClass}} }, -{"::nsf::cmd::ObjectInfo2::hastype", XOTclObjInfoHasTypeMethodStub, 1, { +{"::nsf::cmd::ObjectInfo::hastype", XOTclObjInfoHasTypeMethodStub, 1, { {"class", 0, 0, convertToClass}} }, -{"::nsf::cmd::ObjectInfo2::hasnamespace", XOTclObjInfoHasnamespaceMethodStub, 0, { +{"::nsf::cmd::ObjectInfo::hasnamespace", XOTclObjInfoHasnamespaceMethodStub, 0, { } }, -{"::nsf::cmd::ObjectInfo2::method", XOTclObjInfoMethodMethodStub, 2, { +{"::nsf::cmd::ObjectInfo::method", XOTclObjInfoMethodMethodStub, 2, { {"infomethodsubcmd", 0, 0, convertToInfomethodsubcmd}, {"name", 0, 0, convertToString}} }, -{"::nsf::cmd::ObjectInfo2::methods", XOTclObjInfoMethodsMethodStub, 5, { +{"::nsf::cmd::ObjectInfo::methods", XOTclObjInfoMethodsMethodStub, 5, { {"-methodtype", 0, 1, convertToMethodtype}, {"-callprotection", 0, 1, convertToCallprotection}, {"-nomixins", 0, 0, convertToString}, {"-incontext", 0, 0, convertToString}, {"pattern", 0, 0, convertToString}} }, -{"::nsf::cmd::ObjectInfo2::mixinclasses", XOTclObjInfoMixinclassesMethodStub, 3, { +{"::nsf::cmd::ObjectInfo::mixinclasses", XOTclObjInfoMixinclassesMethodStub, 3, { {"-guards", 0, 0, convertToString}, {"-order", 0, 0, convertToString}, {"pattern", 0, 0, convertToObjpattern}} }, -{"::nsf::cmd::ObjectInfo2::mixinguard", XOTclObjInfoMixinguardMethodStub, 1, { +{"::nsf::cmd::ObjectInfo::mixinguard", XOTclObjInfoMixinguardMethodStub, 1, { {"mixin", 1, 0, convertToString}} }, -{"::nsf::cmd::ObjectInfo2::parent", XOTclObjInfoParentMethodStub, 0, { +{"::nsf::cmd::ObjectInfo::parent", XOTclObjInfoParentMethodStub, 0, { } }, -{"::nsf::cmd::ObjectInfo2::precedence", XOTclObjInfoPrecedenceMethodStub, 2, { +{"::nsf::cmd::ObjectInfo::precedence", XOTclObjInfoPrecedenceMethodStub, 2, { {"-intrinsic", 0, 0, convertToString}, {"pattern", 0, 0, convertToString}} }, -{"::nsf::cmd::ObjectInfo2::slotobjects", XOTclObjInfoSlotObjectsMethodStub, 1, { +{"::nsf::cmd::ObjectInfo::slotobjects", XOTclObjInfoSlotObjectsMethodStub, 1, { {"pattern", 0, 0, convertToString}} }, -{"::nsf::cmd::ObjectInfo2::vars", XOTclObjInfoVarsMethodStub, 1, { +{"::nsf::cmd::ObjectInfo::vars", XOTclObjInfoVarsMethodStub, 1, { {"pattern", 0, 0, convertToString}} }, {"::nsf::alias", XOTclAliasCmdStub, 6, { Index: library/nx/nx.tcl =================================================================== diff -u -r18122dd21b99cf0d5b4cd01635048641a23aa051 -r1008a85cf8fe5d95365568f6c765a83389028ff2 --- library/nx/nx.tcl (.../nx.tcl) (revision 18122dd21b99cf0d5b4cd01635048641a23aa051) +++ library/nx/nx.tcl (.../nx.tcl) (revision 1008a85cf8fe5d95365568f6c765a83389028ff2) @@ -348,7 +348,7 @@ foreach w [lrange $path 0 end-1] { #puts stderr "check $object info methods $path @ <$w>" set scope [expr {[nsf::objectproperty $object class] && !${per-object} ? "Class" : "Object"}] - if {[$object ::nsf::cmd::${scope}Info2::methods -methodtype all $w] eq ""} { + if {[$object ::nsf::cmd::${scope}Info::methods -methodtype all $w] eq ""} { # # Create dispatch/ensemble object and accessor method (if wanted) # @@ -373,8 +373,8 @@ # The accessor method exists already, check, if it is # appropriate for extending. # - set type [$object ::nsf::cmd::${scope}Info2::method type $w] - set definition [$object ::nsf::cmd::${scope}Info2::method definition $w] + set type [$object ::nsf::cmd::${scope}Info::method type $w] + set definition [$object ::nsf::cmd::${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"} @@ -746,13 +746,13 @@ # registed, give an Ensemble object. # set self [::nsf::current object] - set parent [::nsf::dispatch $self ::nsf::cmd::ObjectInfo2::parent] - set grandparent [::nsf::dispatch $parent ::nsf::cmd::ObjectInfo2::parent] + set parent [::nsf::dispatch $self ::nsf::cmd::ObjectInfo::parent] + set grandparent [::nsf::dispatch $parent ::nsf::cmd::ObjectInfo::parent] set tail [namespace tail $parent] if {$tail eq "slot" && [::nsf::objectproperty $grandparent class]} { - set aliases [::nsf::dispatch $grandparent ::nsf::cmd::ClassInfo2::methods -methodtype alias] + set aliases [::nsf::dispatch $grandparent ::nsf::cmd::ClassInfo::methods -methodtype alias] foreach alias $aliases { - set def [::nsf::dispatch $grandparent ::nsf::cmd::ClassInfo2::method definition $alias] + set def [::nsf::dispatch $grandparent ::nsf::cmd::ClassInfo::method definition $alias] if {[lindex $def end] eq $self} { return [list name [lindex $def 2] regobj ] } @@ -770,7 +770,7 @@ array set "" [$o ::nsf::classes::nx::EnsembleObject::subcmdName] set path $(name) while {1} { - set o [::nsf::dispatch $o ::nsf::cmd::ObjectInfo2::parent] + set o [::nsf::dispatch $o ::nsf::cmd::ObjectInfo::parent] if {![::nsf::objectproperty $o type ::nx::EnsembleObject]} break array set "" [$o ::nsf::classes::nx::EnsembleObject::subcmdName] set path "$(name) $path" @@ -785,10 +785,10 @@ # set result [list] set self [::nsf::current object] - set methods [lsort [::nsf::dispatch $self ::nsf::cmd::ObjectInfo2::methods]] + set methods [lsort [::nsf::dispatch $self ::nsf::cmd::ObjectInfo::methods]] array set "" [$self ::nsf::classes::nx::EnsembleObject::subcmdName] foreach m $methods { - set type [::nsf::dispatch $self ::nsf::cmd::ObjectInfo2::method type $m] + set type [::nsf::dispatch $self ::nsf::cmd::ObjectInfo::method type $m] if {$type eq "object"} { foreach {obj submethod} \ [::nsf::dispatch ${self}::$m ::nsf::classes::nx::EnsembleObject::subMethods] { @@ -808,20 +808,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::ObjectInfo2::methods]] + set subcmds [lsort [::nsf::dispatch $self ::nsf::cmd::ObjectInfo::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::ObjectInfo2::methods]] + set methods [lsort [::nsf::dispatch $self ::nsf::cmd::ObjectInfo::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::ObjectInfo2::method parametersyntax $m] + set cmd [::nsf::dispatch $obj ::nsf::cmd::ObjectInfo::method parametersyntax $m] puts stderr "$(regobj) $(path) $m $cmd" } return $methods @@ -837,30 +837,30 @@ # we have to use "eval", since objectParameters are not defined yet Object eval { - :alias "info callable" ::nsf::cmd::ObjectInfo2::callable - :alias "info children" ::nsf::cmd::ObjectInfo2::children - :alias "info class" ::nsf::cmd::ObjectInfo2::class - :alias "info filter guard" ::nsf::cmd::ObjectInfo2::filterguard - :alias "info filter methods" ::nsf::cmd::ObjectInfo2::filtermethods - :alias "info forward" ::nsf::cmd::ObjectInfo2::forward - :alias "info has mixin" ::nsf::cmd::ObjectInfo2::hasmixin - :alias "info has namespace" ::nsf::cmd::ObjectInfo2::hasnamespace - :alias "info has type" ::nsf::cmd::ObjectInfo2::hastype + :alias "info callable" ::nsf::cmd::ObjectInfo::callable + :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 :method "info is" {kind} {::nsf::objectproperty [::nsf::current object] $kind} - :alias "info methods" ::nsf::cmd::ObjectInfo2::methods - :alias "info mixin guard" ::nsf::cmd::ObjectInfo2::mixinguard - :alias "info mixin classes" ::nsf::cmd::ObjectInfo2::mixinclasses - :alias "info parent" ::nsf::cmd::ObjectInfo2::parent - :alias "info precedence" ::nsf::cmd::ObjectInfo2::precedence + :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 :method "info slotobjects" {} { set result [list] - foreach slot [::nsf::dispatch [::nsf::current object] ::nsf::cmd::ObjectInfo2::slotobjects] { - if {![::nsf::dispatch $slot ::nsf::cmd::ObjectInfo2::hastype ::nx::Slot]} continue + foreach slot [::nsf::dispatch [::nsf::current object] ::nsf::cmd::ObjectInfo::slotobjects] { + if {![::nsf::dispatch $slot ::nsf::cmd::ObjectInfo::hastype ::nx::Slot]} continue lappend result $slot } return $result } - :alias "info vars" ::nsf::cmd::ObjectInfo2::vars + :alias "info vars" ::nsf::cmd::ObjectInfo::vars } # Create the ensemble object here to prepare for copy of the above @@ -875,39 +875,39 @@ # # copy all methods except the subobjects to ::nx::Class::slot::__info # - foreach m [::nx::Object::slot::__info ::nsf::cmd::ObjectInfo2::methods] { - if {[::nx::Object::slot::__info ::nsf::cmd::ObjectInfo2::method type $m] eq "object"} continue - set definition [::nx::Object::slot::__info ::nsf::cmd::ObjectInfo2::method definition $m] + foreach m [::nx::Object::slot::__info ::nsf::cmd::ObjectInfo::methods] { + if {[::nx::Object::slot::__info ::nsf::cmd::ObjectInfo::method type $m] eq "object"} continue + set definition [::nx::Object::slot::__info ::nsf::cmd::ObjectInfo::method definition $m] ::nx::Class::slot::__info {*}[lrange $definition 1 end] } Class eval { - #:alias "info classparent" ::nsf::cmd::ObjectInfo2::parent - #:alias "info classchildren" ::nsf::cmd::ObjectInfo2::children - :alias "info filter guard" ::nsf::cmd::ClassInfo2::filterguard - :alias "info has mixin" ::nsf::cmd::ObjectInfo2::hasmixin - :alias "info has namespace" ::nsf::cmd::ObjectInfo2::hasnamespace - :alias "info has type" ::nsf::cmd::ObjectInfo2::hastype - :alias "info filter methods" ::nsf::cmd::ClassInfo2::filtermethods - :alias "info forward" ::nsf::cmd::ClassInfo2::forward - :alias "info heritage" ::nsf::cmd::ClassInfo2::heritage - :alias "info instances" ::nsf::cmd::ClassInfo2::instances - :alias "info methods" ::nsf::cmd::ClassInfo2::methods - :alias "info mixin guard" ::nsf::cmd::ClassInfo2::mixinguard - :alias "info mixin classes" ::nsf::cmd::ClassInfo2::mixinclasses - :alias "info mixinof" ::nsf::cmd::ClassInfo2::mixinof - :alias "info slots" ::nsf::cmd::ClassInfo2::slots - :alias "info subclass" ::nsf::cmd::ClassInfo2::subclass - :alias "info superclass" ::nsf::cmd::ClassInfo2::superclass + #:alias "info classparent" ::nsf::cmd::ObjectInfo::parent + #:alias "info classchildren" ::nsf::cmd::ObjectInfo::children + :alias "info filter guard" ::nsf::cmd::ClassInfo::filterguard + :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 filter methods" ::nsf::cmd::ClassInfo::filtermethods + :alias "info forward" ::nsf::cmd::ClassInfo::forward + :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 slots" ::nsf::cmd::ClassInfo::slots + :alias "info subclass" ::nsf::cmd::ClassInfo::subclass + :alias "info superclass" ::nsf::cmd::ClassInfo::superclass } # # Define "info info" and unknown # proc ::nx::infoOptions {obj} { - #puts stderr "INFO INFO $obj -> '[::nsf::dispatch $obj ::nsf::cmd::ObjectInfo2::methods -methodtype all]'" + #puts stderr "INFO INFO $obj -> '[::nsf::dispatch $obj ::nsf::cmd::ObjectInfo::methods -methodtype all]'" set methods [list] - foreach name [::nsf::dispatch $obj ::nsf::cmd::ObjectInfo2::methods -methodtype all] { + foreach name [::nsf::dispatch $obj ::nsf::cmd::ObjectInfo::methods -methodtype all] { if {$name eq "unknown"} continue lappend methods $name } @@ -922,22 +922,22 @@ 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::ObjectInfo2::method - Class alias "info method" ::nsf::cmd::ClassInfo2::method + Object alias "info method" ::nsf::cmd::ObjectInfo::method + Class alias "info method" ::nsf::cmd::ClassInfo::method # TOOD REMOVE BLOCK # puts "After Info" # puts object-methods=[Object info methods] # puts class-methods=[Class info methods] # puts "" - # puts Object::info-methods=[lsort [nsf::dispatch ::nx::Object::slot::__info ::nsf::cmd::ObjectInfo2::methods]] - # puts Class::info-methods_=[lsort [nsf::dispatch ::nx::Class::slot::__info ::nsf::cmd::ObjectInfo2::methods]] + # puts Object::info-methods=[lsort [nsf::dispatch ::nx::Object::slot::__info ::nsf::cmd::ObjectInfo::methods]] + # puts Class::info-methods_=[lsort [nsf::dispatch ::nx::Class::slot::__info ::nsf::cmd::ObjectInfo::methods]] # puts "" - # puts Object::info-callable=[nsf::dispatch ::nx::Object ::nsf::cmd::ObjectInfo2::callable method info] - # puts Class::info-callable_=[nsf::dispatch ::nx::Class ::nsf::cmd::ObjectInfo2::callable method info] + # puts Object::info-callable=[nsf::dispatch ::nx::Object ::nsf::cmd::ObjectInfo::callable method info] + # puts Class::info-callable_=[nsf::dispatch ::nx::Class ::nsf::cmd::ObjectInfo::callable method info] # puts "" - # puts Object::info-def=[nsf::dispatch ::nx::Object ::nsf::cmd::ClassInfo2::method definition info] - # puts Class::info-def_=[nsf::dispatch ::nx::Class ::nsf::cmd::ClassInfo2::method definition info] + # puts Object::info-def=[nsf::dispatch ::nx::Object ::nsf::cmd::ClassInfo::method definition info] + # puts Class::info-def_=[nsf::dispatch ::nx::Class ::nsf::cmd::ClassInfo::method definition info] # puts "" # puts object-superclass=[Object info superclass] # puts class-superclass=[Class info superclass] @@ -1019,9 +1019,9 @@ } if {${per-object}} { lappend opts -per-object true - set info ObjectInfo2 + set info ObjectInfo } else { - set info ClassInfo2 + set info ClassInfo } :create [::nx::slotObj $target $name] {*}$opts $initblock @@ -1083,7 +1083,7 @@ if {[info exists default]} { # checking subclasses is not required during bootstrap - foreach i [::nsf::dispatch $class ::nsf::cmd::ClassInfo2::instances] { + foreach i [::nsf::dispatch $class ::nsf::cmd::ClassInfo::instances] { if {![::nsf::existsvar $i $att]} { if {[string match {*\[*\]*} $default]} { set value [::nsf::dispatch $i -objscope ::eval subst $default] @@ -1200,8 +1200,8 @@ ObjectParameterSlot method unknown {method args} { set methods [list] - foreach m [::nsf::dispatch [::nsf::current object] ::nsf::cmd::ObjectInfo2::callable methods] { - if {[::nsf::dispatch Object ::nsf::cmd::ObjectInfo2::callable methods $m] ne ""} continue + foreach m [::nsf::dispatch [::nsf::current object] ::nsf::cmd::ObjectInfo::callable methods] { + if {[::nsf::dispatch Object ::nsf::cmd::ObjectInfo::callable methods $m] ne ""} continue if {[string match __* $m]} continue lappend methods $m } @@ -1328,13 +1328,13 @@ proc ::nsf::parametersFromSlots {obj} { set parameterdefinitions [list] - foreach slot [::nsf::dispatch $obj ::nsf::cmd::ObjectInfo2::slotobjects] { + foreach slot [::nsf::dispatch $obj ::nsf::cmd::ObjectInfo::slotobjects] { # TODO: the following line is just for the somehwat dummy "...::slot::__info" - if {![::nsf::dispatch $slot ::nsf::cmd::ObjectInfo2::hastype ::nx::Slot]} continue + if {![::nsf::dispatch $slot ::nsf::cmd::ObjectInfo::hastype ::nx::Slot]} continue # Skip some slots for xotcl; # TODO: maybe different parameterFromSlots for xotcl? if {[::nsf::objectproperty ::xotcl::Object class] - && [::nsf::dispatch $obj ::nsf::cmd::ObjectInfo2::hastype ::xotcl::Object] && + && [::nsf::dispatch $obj ::nsf::cmd::ObjectInfo::hastype ::xotcl::Object] && ([$slot name] eq "mixin" || [$slot name] eq "filter") } continue array set "" [$slot toParameterSyntax] @@ -1683,7 +1683,7 @@ set perObject "" set infokind Class } - if {[::nsf::dispatch ${:domain} ::nsf::cmd::${infokind}Info2::method handle ${:name}] ne ""} { + if {[::nsf::dispatch ${:domain} ::nsf::cmd::${infokind}Info::method handle ${:name}] ne ""} { #puts stderr "OPTIMIZER RESETTING ${:domain} slot ${:name}" ::nsf::forward ${:domain} {*}$perObject ${:name} \ ${:manager} \ @@ -1854,7 +1854,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::ObjectInfo2::hasnamespace]} { + if {[::nsf::dispatch $t ::nsf::cmd::ObjectInfo::hasnamespace]} { # make target list from all children set children [$t info children] } else { @@ -1913,20 +1913,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::ObjectInfo2::hasnamespace]} { + if {[::nsf::dispatch $origin ::nsf::cmd::ObjectInfo::hasnamespace]} { ::nsf::dispatch $obj ::nsf::cmd::Object::requireNamespace } } else { namespace eval $dest {} } :copyNSVarsAndCmds $origin $dest - foreach i [$origin ::nsf::cmd::ObjectInfo2::forward] { - ::nsf::forward $dest -per-object $i {*}[$origin ::nsf::cmd::ObjectInfo2::forward -definition $i] + foreach i [$origin ::nsf::cmd::ObjectInfo::forward] { + ::nsf::forward $dest -per-object $i {*}[$origin ::nsf::cmd::ObjectInfo::forward -definition $i] } if {[::nsf::objectproperty $origin class]} { - foreach i [$origin ::nsf::cmd::ClassInfo2::forward] { - ::nsf::forward $dest $i {*}[$origin ::nsf::cmd::ClassInfo2::forward -definition $i] + foreach i [$origin ::nsf::cmd::ClassInfo::forward] { + ::nsf::forward $dest $i {*}[$origin ::nsf::cmd::ClassInfo::forward -definition $i] } } set traces [list] Index: library/serialize/serializer.tcl =================================================================== diff -u -r18122dd21b99cf0d5b4cd01635048641a23aa051 -r1008a85cf8fe5d95365568f6c765a83389028ff2 --- library/serialize/serializer.tcl (.../serializer.tcl) (revision 18122dd21b99cf0d5b4cd01635048641a23aa051) +++ library/serialize/serializer.tcl (.../serializer.tcl) (revision 1008a85cf8fe5d95365568f6c765a83389028ff2) @@ -467,7 +467,7 @@ :method registerSerializer {s instances} { # Communicate responsibility to serializer object $s foreach i $instances { - if {![::nsf::dispatch $i ::nsf::cmd::ObjectInfo2::hastype ${:rootClass}]} continue + if {![::nsf::dispatch $i ::nsf::cmd::ObjectInfo::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::ObjectInfo2::hastype ${:rootClass}]} { + } elseif {[::nsf::dispatch $o ::nsf::cmd::ObjectInfo::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::ObjectInfo2::hastype ${:rootClass}]} { + } elseif {[nsf::dispatch $o ::nsf::cmd::ObjectInfo::hastype ${:rootClass}]} { set :exportObjects($o) 1 } } @@ -516,7 +516,7 @@ ############################### :method classify {o} { - if {[::nsf::dispatch $o ::nsf::cmd::ObjectInfo2::hastype ${:rootMetaClass}]} \ + if {[::nsf::dispatch $o ::nsf::cmd::ObjectInfo::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::ObjectInfo2::methods]] { + foreach i [lsort [$o ::nsf::cmd::ObjectInfo::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::ClassInfo2::methods]] { + foreach i [lsort [$o ::nsf::cmd::ClassInfo::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::ObjectInfo2::methods -methodtype scripted] { + foreach i [$o ::nsf::cmd::ObjectInfo::methods -methodtype scripted] { append cmd [:method-serialize $o $i ""] "\n" } - foreach i [$o ::nsf::cmd::ObjectInfo2::methods -methodtype forward] { + foreach i [$o ::nsf::cmd::ObjectInfo::methods -methodtype forward] { append cmd [concat [list $o] forward $i [$o info forward -definition $i]] "\n" } - foreach i [$o ::nsf::cmd::ObjectInfo2::methods -methodtype setter] { + foreach i [$o ::nsf::cmd::ObjectInfo::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::ClassInfo2::methods -methodtype alias] { - set xotcl2Def [$o ::nsf::cmd::ClassInfo2::method definition $i] + foreach i [$o ::nsf::cmd::ClassInfo::methods -methodtype alias] { + set xotcl2Def [$o ::nsf::cmd::ClassInfo::method definition $i] set objscope [lindex $xotcl2Def end-2] set methodName [lindex $xotcl2Def end-1] set cmdName [lindex $xotcl2Def end] Index: library/xotcl/library/xotcl2.tcl =================================================================== diff -u -r18122dd21b99cf0d5b4cd01635048641a23aa051 -r1008a85cf8fe5d95365568f6c765a83389028ff2 --- library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision 18122dd21b99cf0d5b4cd01635048641a23aa051) +++ library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision 1008a85cf8fe5d95365568f6c765a83389028ff2) @@ -396,8 +396,8 @@ proc ::xotcl::info_args {allocation o method} { set result [list] foreach \ - argName [$o ::nsf::cmd::${allocation}Info2::method args $method] \ - flag [$o ::nsf::cmd::${allocation}Info2::method parameter $method] { + argName [$o ::nsf::cmd::${allocation}Info::method args $method] \ + flag [$o ::nsf::cmd::${allocation}Info::method parameter $method] { if {[string match -* $flag]} continue lappend result $argName } @@ -407,7 +407,7 @@ proc ::xotcl::info_nonposargs {allocation o method} { set result [list] - foreach flag [$o ::nsf::cmd::${allocation}Info2::method parameter $method] { + foreach flag [$o ::nsf::cmd::${allocation}Info::method parameter $method] { if {![string match -* $flag]} continue lappend result $flag } @@ -416,8 +416,8 @@ } proc ::xotcl::info_default {allocation o method arg varName} { foreach \ - argName [$o ::nsf::cmd::${allocation}Info2::method args $method] \ - flag [$o ::nsf::cmd::${allocation}Info2::method parameter $method] { + argName [$o ::nsf::cmd::${allocation}Info::method args $method] \ + flag [$o ::nsf::cmd::${allocation}Info::method parameter $method] { if {$argName eq $arg} { upvar 2 $varName default #puts "--- info_default var '$varName' level=[info level]" @@ -439,12 +439,12 @@ objectInfo eval { :proc args {method} {::xotcl::info_args Object [self] $method} - :proc body {methodName} {my ::nsf::cmd::ObjectInfo2::method body $methodName} + :proc body {methodName} {my ::nsf::cmd::ObjectInfo::method body $methodName} :proc check {} {::xotcl::checkoption_internal_to_xotcl1 [::nsf::assertion [self] check]} - :alias class ::nsf::cmd::ObjectInfo2::class - :alias children ::nsf::cmd::ObjectInfo2::children + :alias class ::nsf::cmd::ObjectInfo::class + :alias children ::nsf::cmd::ObjectInfo::children :proc commands {{pattern ""}} { - my ::nsf::cmd::ObjectInfo2::methods -methodtype all {*}$pattern + my ::nsf::cmd::ObjectInfo::methods -methodtype all {*}$pattern } :proc default {method arg varName} { # pass varName to be able produce the right error message @@ -457,23 +457,23 @@ set patternArg [expr {[info exists pattern] ? [list $pattern] : ""}] if {$order && !$guards} { set def [::nsf::dispatch [::nsf::current object] \ - ::nsf::cmd::ObjectInfo2::filtermethods -order \ + ::nsf::cmd::ObjectInfo::filtermethods -order \ {*}$guardsFlag \ {*}$patternArg] set def [method_handles_to_xotcl $def] } else { set def [::nsf::dispatch [::nsf::current object] \ - ::nsf::cmd::ObjectInfo2::filtermethods \ + ::nsf::cmd::ObjectInfo::filtermethods \ {*}$guardsFlag \ {*}$patternArg] } #puts stderr " => $def" return $def } - :alias filterguard ::nsf::cmd::ObjectInfo2::filterguard - :alias forward ::nsf::cmd::ObjectInfo2::forward - :alias hasnamespace ::nsf::cmd::ObjectInfo2::hasnamespace + :alias filterguard ::nsf::cmd::ObjectInfo::filterguard + :alias forward ::nsf::cmd::ObjectInfo::forward + :alias hasnamespace ::nsf::cmd::ObjectInfo::hasnamespace :proc invar {} {::nsf::assertion [self] object-invar} #:proc is {kind} {::nsf::objectproperty [::nsf::current object] $kind} @@ -483,36 +483,36 @@ set methodtype all if {$nocmds} {set methodtype scripted} if {$noprocs} {if {$nocmds} {return ""}; set methodtype builtin} - set cmd [list ::nsf::cmd::ObjectInfo2::callable methods -methodtype $methodtype] + set cmd [list ::nsf::cmd::ObjectInfo::callable methods -methodtype $methodtype] if {$incontext} {lappend cmd -incontext} if {[info exists pattern]} {lappend cmd $pattern} my {*}$cmd } - :alias mixin ::nsf::cmd::ObjectInfo2::mixinclasses - :alias mixinguard ::nsf::cmd::ObjectInfo2::mixinguard + :alias mixin ::nsf::cmd::ObjectInfo::mixinclasses + :alias mixinguard ::nsf::cmd::ObjectInfo::mixinguard :proc nonposargs {method} {::xotcl::info_nonposargs Object [self] $method} :proc parametercmd {name} {::nsf::classes::nx::Object::setter [self] $name} - :alias parent ::nsf::cmd::ObjectInfo2::parent - :proc post {methodName} {my ::nsf::cmd::ObjectInfo2::method post $methodName} - :proc pre {methodName} {my ::nsf::cmd::ObjectInfo2::method pre $methodName} + :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} :proc procs {{pattern ""}} { - my ::nsf::cmd::ObjectInfo2::methods -methodtype scripted {*}$pattern + my ::nsf::cmd::ObjectInfo::methods -methodtype scripted {*}$pattern } - :alias precedence ::nsf::cmd::ObjectInfo2::precedence - :alias vars ::nsf::cmd::ObjectInfo2::vars + :alias precedence ::nsf::cmd::ObjectInfo::precedence + :alias vars ::nsf::cmd::ObjectInfo::vars } # # copy all methods from Object.info to Class.info # - foreach m [objectInfo ::nsf::cmd::ObjectInfo2::methods] { - ::nsf::alias classInfo $m [objectInfo ::nsf::cmd::ObjectInfo2::method handle $m] + foreach m [objectInfo ::nsf::cmd::ObjectInfo::methods] { + ::nsf::alias classInfo $m [objectInfo ::nsf::cmd::ObjectInfo::method handle $m] } classInfo eval { - :alias classchildren ::nsf::cmd::ObjectInfo2::children - :alias classparent ::nsf::cmd::ObjectInfo2::parent + :alias classchildren ::nsf::cmd::ObjectInfo::children + :alias classparent ::nsf::cmd::ObjectInfo::parent :proc default {method arg varName} { # TODO: interesting observation: we cannot use the alias to # objectInfo here, but we have to rewrite the proc, since an @@ -522,12 +522,12 @@ #puts "--- var '$varName' level=[info level]" return $r } - :alias heritage ::nsf::cmd::ClassInfo2::heritage - :alias instances ::nsf::cmd::ClassInfo2::instances + :alias heritage ::nsf::cmd::ClassInfo::heritage + :alias instances ::nsf::cmd::ClassInfo::instances :proc instargs {method} {::xotcl::info_args Class [self] $method} - :proc instbody {methodName} {my ::nsf::cmd::ClassInfo2::method body $methodName} - :proc instcommands {{pattern ""}} {my ::nsf::cmd::ClassInfo2::methods {*}$pattern} + :proc instbody {methodName} {my ::nsf::cmd::ClassInfo::method body $methodName} + :proc instcommands {{pattern ""}} {my ::nsf::cmd::ClassInfo::methods {*}$pattern} :proc instdefault {method arg varName} { set r [::xotcl::info_default Class [self] $method $arg $varName] #puts "--- default for [self].$method $arg -> $r [info exists var]" @@ -537,37 +537,37 @@ #puts "--- level -2 [info level [expr [info level]-2]]" return $r } - :alias instfilter ::nsf::cmd::ClassInfo2::filtermethods - :alias instfilterguard ::nsf::cmd::ClassInfo2::filterguard - :alias instforward ::nsf::cmd::ClassInfo2::forward + :alias instfilter ::nsf::cmd::ClassInfo::filtermethods + :alias instfilterguard ::nsf::cmd::ClassInfo::filterguard + :alias instforward ::nsf::cmd::ClassInfo::forward :proc instinvar {} {::nsf::assertion [self] class-invar} - :alias instmixin ::nsf::cmd::ClassInfo2::mixinclasses - :alias instmixinguard ::nsf::cmd::ClassInfo2::mixinguard + :alias instmixin ::nsf::cmd::ClassInfo::mixinclasses + :alias instmixinguard ::nsf::cmd::ClassInfo::mixinguard :proc instmixinof {-closure {pattern ""}} { - my ::nsf::cmd::ClassInfo2::mixinof -scope class \ + my ::nsf::cmd::ClassInfo::mixinof -scope class \ {*}[expr {$closure ? "-closure" : ""}] \ {*}$pattern } :proc instparametercmd {{pattern ""}} { - my ::nsf::cmd::ClassInfo2::methods -methodtype setter {*}$pattern + my ::nsf::cmd::ClassInfo::methods -methodtype setter {*}$pattern } :proc instnonposargs {method} {::xotcl::info_nonposargs Class [self] $method} - :proc instpost {methodName} {my ::nsf::cmd::ClassInfo2::method postcondition $methodName} - :proc instpre {methodName} {my ::nsf::cmd::ClassInfo2::method precondition $methodName} + :proc instpost {methodName} {my ::nsf::cmd::ClassInfo::method postcondition $methodName} + :proc instpre {methodName} {my ::nsf::cmd::ClassInfo::method precondition $methodName} :proc instprocs {{pattern ""}} { - my ::nsf::cmd::ClassInfo2::methods -methodtype scripted {*}$pattern + my ::nsf::cmd::ClassInfo::methods -methodtype scripted {*}$pattern } :proc mixinof {-closure:switch {pattern ""}} { - my ::nsf::cmd::ClassInfo2::mixinof -scope object \ + my ::nsf::cmd::ClassInfo::mixinof -scope object \ {*}[expr {$closure ? "-closure" : ""}] \ {*}$pattern } :alias parameter ::nx::Class::slot::__info::parameter - :alias slots ::nsf::cmd::ClassInfo2::slots - :alias subclass ::nsf::cmd::ClassInfo2::subclass - :alias superclass ::nsf::cmd::ClassInfo2::superclass + :alias slots ::nsf::cmd::ClassInfo::slots + :alias subclass ::nsf::cmd::ClassInfo::subclass + :alias superclass ::nsf::cmd::ClassInfo::superclass } # define "info info" @@ -595,10 +595,10 @@ Object instproc ismetaclass {{class:substdefault "[self]"}} {::nsf::objectproperty $class metaclass} Object instproc ismixin {class} { expr {[::nsf::objectproperty $class class] && - [my ::nsf::cmd::ObjectInfo2::hasmixin $class]}} + [my ::nsf::cmd::ObjectInfo::hasmixin $class]}} Object instproc istype {class} { expr {[::nsf::objectproperty $class class] && - [::nsf::dispatch [self] ::nsf::cmd::ObjectInfo2::hastype $class]} + [::nsf::dispatch [self] ::nsf::cmd::ObjectInfo::hastype $class]} } # definitin of "contains", based on nx @@ -690,17 +690,17 @@ # support for XOTcl specific convenience routines Object instproc hasclass cl { if {![::nsf::objectproperty $cl class]} {return 0} - if {[my ::nsf::cmd::ObjectInfo2::hasmixin $cl]} {return 1} - ::nsf::dispatch [self] ::nsf::cmd::ObjectInfo2::hastype $cl + if {[my ::nsf::cmd::ObjectInfo::hasmixin $cl]} {return 1} + ::nsf::dispatch [self] ::nsf::cmd::ObjectInfo::hastype $cl } Object instproc filtersearch {filter} { set handle [::nsf::dispatch [::nsf::current object] \ - ::nsf::cmd::ObjectInfo2::callable filter $filter] + ::nsf::cmd::ObjectInfo::callable filter $filter] return [method_handle_to_xotcl $handle] } Object instproc procsearch {name} { set handle [::nsf::dispatch [::nsf::current object] \ - ::nsf::cmd::ObjectInfo2::callable method $name] + ::nsf::cmd::ObjectInfo::callable method $name] return [method_handle_to_xotcl $handle] } Class instproc allinstances {} { Index: tests/parameters.tcl =================================================================== diff -u -r18122dd21b99cf0d5b4cd01635048641a23aa051 -r1008a85cf8fe5d95365568f6c765a83389028ff2 --- tests/parameters.tcl (.../parameters.tcl) (revision 18122dd21b99cf0d5b4cd01635048641a23aa051) +++ tests/parameters.tcl (.../parameters.tcl) (revision 1008a85cf8fe5d95365568f6c765a83389028ff2) @@ -43,8 +43,8 @@ ? {c1 info has type C} 1 ? {c1 info has type C1} {expected class but got "C1" for parameter class} #? {::nsf::is c1 object -type C} 1 - ? {c1 ::nsf::cmd::ObjectInfo2::hastype C} 1 - ? {::nsf::dispatch c1 ::nsf::cmd::ObjectInfo2::hastype C} 1 + ? {c1 ::nsf::cmd::ObjectInfo::hastype C} 1 + ? {::nsf::dispatch c1 ::nsf::cmd::ObjectInfo::hastype C} 1 #? {::nsf::is c1 object -hasmixin M -type C} 1 #? {::nsf::is c1 object -hasmixin M1 -type C} 0