Index: generic/gentclAPI.decls =================================================================== diff -u -rd5785e8f405e03767db40836127cab24cf8f8b85 -r1f0231a5c7cbb8dfef4eaf78335c9ad571863660 --- generic/gentclAPI.decls (.../gentclAPI.decls) (revision d5785e8f405e03767db40836127cab24cf8f8b85) +++ generic/gentclAPI.decls (.../gentclAPI.decls) (revision 1f0231a5c7cbb8dfef4eaf78335c9ad571863660) @@ -161,9 +161,6 @@ } objectMethod noinit XOTclONoinitMethod { } -objectMethod procsearch XOTclOProcSearchMethod { - {-argName "name" -required 1} -} objectMethod requireNamespace XOTclORequireNamespaceMethod { } objectMethod residualargs XOTclOResidualargsMethod { @@ -306,9 +303,17 @@ {-argName "name"} } +infoObjectMethod callable XOTclObjInfoCallableMethod { + {-argName "object" -type object} + {-argName "-which"} + {-argName "-methodtype" -nrargs 1 -type "all|scripted|system|alias|forwarder|object|setter"} + {-argName "-nomixins"} + {-argName "-incontext"} + {-argName "pattern" -required 0} +} + infoObjectMethod methods XOTclObjInfoMethodsMethod { {-argName "object" -type object} - {-argName "-defined"} {-argName "-methodtype" -nrargs 1 -type "all|scripted|system|alias|forwarder|object|setter"} {-argName "-nomixins"} {-argName "-incontext"} @@ -317,7 +322,6 @@ ### TODO move finally to infoclassmethod infoClassMethod methods XOTclClassInfoMethodsMethod { {-argName "object" -type class} - {-argName "-defined"} {-argName "-methodtype" -nrargs 1 -type "all|scripted|system|alias|forwarder|object|setter"} {-argName "-nomixins"} {-argName "-incontext"} Index: generic/predefined.h =================================================================== diff -u -r9be992c0b15d88b32a95113f01d4fa92eb9342f5 -r1f0231a5c7cbb8dfef4eaf78335c9ad571863660 --- generic/predefined.h (.../predefined.h) (revision 9be992c0b15d88b32a95113f01d4fa92eb9342f5) +++ generic/predefined.h (.../predefined.h) (revision 1f0231a5c7cbb8dfef4eaf78335c9ad571863660) @@ -40,7 +40,7 @@ ".alias is ::xotcl::is\n" ".method info {obj} {\n" "set methods [list]\n" -"foreach name [::xotcl::cmd::ObjectInfo::methods [self] -defined] {\n" +"foreach name [::xotcl::cmd::ObjectInfo::methods [self]] {\n" "if {$name eq \"unknown\"} continue\n" "lappend methods $name}\n" "return \"valid options are: [join [lsort $methods] {, }]\"}\n" @@ -177,8 +177,8 @@ "error \"$value is not a $prop of $obj (valid are: $old)\"}}\n" "::xotcl::Slot method unknown {method args} {\n" "set methods [list]\n" -"foreach m [.info methods] {\n" -"if {[::xotcl2::Object info methods $m] ne \"\"} continue\n" +"foreach m [.info callable] {\n" +"if {[::xotcl2::Object info callable $m] ne \"\"} continue\n" "if {[string match __* $m]} continue\n" "lappend methods $m}\n" "error \"Method '$method' unknown for slot [::xotcl::self]; valid are: {[lsort $methods]]}\"}\n" @@ -312,8 +312,8 @@ ".method optimize {} {\n" "if {[set .multivalued]} return\n" "if {[set .defaultmethods] ne {get assign}} return\n" -"if {[.procsearch assign] ne \"::xotcl::Slot instcmd assign\"} return\n" -"if {[.procsearch get] ne \"::xotcl::Slot instcmd get\"} return\n" +"if {[.info callable -which assign] ne \"::xotcl::Slot alias assign ::xotcl::setinstvar\"} return\n" +"if {[.info callable -which get] ne \"::xotcl::Slot alias get ::xotcl::setinstvar\"} return\n" "${.domain} setter {*}[expr {${.per-object} ? \"-per-object\" : \"\"}] ${.name}}}\n" "::xotcl::Attribute mixin add ::xotcl::Slot::Optimizer\n" "::xotcl2::Class create ::xotcl::ScopedNew -superclass ::xotcl2::Class\n" Index: generic/predefined.xotcl =================================================================== diff -u -r9be992c0b15d88b32a95113f01d4fa92eb9342f5 -r1f0231a5c7cbb8dfef4eaf78335c9ad571863660 --- generic/predefined.xotcl (.../predefined.xotcl) (revision 9be992c0b15d88b32a95113f01d4fa92eb9342f5) +++ generic/predefined.xotcl (.../predefined.xotcl) (revision 1f0231a5c7cbb8dfef4eaf78335c9ad571863660) @@ -98,7 +98,7 @@ .method info {obj} { set methods [list] - foreach name [::xotcl::cmd::ObjectInfo::methods [self] -defined] { + foreach name [::xotcl::cmd::ObjectInfo::methods [self]] { if {$name eq "unknown"} continue lappend methods $name } @@ -362,8 +362,8 @@ ::xotcl::Slot method unknown {method args} { set methods [list] - foreach m [.info methods] { - if {[::xotcl2::Object info methods $m] ne ""} continue + foreach m [.info callable] { + if {[::xotcl2::Object info callable $m] ne ""} continue if {[string match __* $m]} continue lappend methods $m } @@ -596,8 +596,9 @@ #${.domain} invalidateobjectparameter if {[set .multivalued]} return if {[set .defaultmethods] ne {get assign}} return - if {[.procsearch assign] ne "::xotcl::Slot instcmd assign"} return - if {[.procsearch get] ne "::xotcl::Slot instcmd get"} return + #puts stderr assign=[.info callable -which assign] + if {[.info callable -which assign] ne "::xotcl::Slot alias assign ::xotcl::setinstvar"} return + if {[.info callable -which get] ne "::xotcl::Slot alias get ::xotcl::setinstvar"} return #puts stderr "**** optimizing ${.domain} $forwarder ${.name}" ${.domain} setter {*}[expr {${.per-object} ? "-per-object" : ""}] ${.name} } Index: generic/tclAPI.h =================================================================== diff -u -rd5785e8f405e03767db40836127cab24cf8f8b85 -r1f0231a5c7cbb8dfef4eaf78335c9ad571863660 --- generic/tclAPI.h (.../tclAPI.h) (revision d5785e8f405e03767db40836127cab24cf8f8b85) +++ generic/tclAPI.h (.../tclAPI.h) (revision 1f0231a5c7cbb8dfef4eaf78335c9ad571863660) @@ -117,6 +117,7 @@ static int XOTclClassInfoSlotsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclClassInfoSubclassMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclClassInfoSuperclassMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); +static int XOTclObjInfoCallableMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclObjInfoCheckMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclObjInfoChildrenMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclObjInfoClassMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); @@ -148,7 +149,6 @@ static int XOTclOMixinGuardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclONextMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclONoinitMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); -static int XOTclOProcSearchMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclORequireNamespaceMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclOResidualargsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclOSetterMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); @@ -197,14 +197,15 @@ static int XOTclClassInfoInstmixinofMethod(Tcl_Interp *interp, XOTclClass *class, int withClosure, char *patternString, XOTclObject *patternObj); static int XOTclClassInfoInvarMethod(Tcl_Interp *interp, XOTclClass *class); static int XOTclClassInfoMethodMethod(Tcl_Interp *interp, XOTclClass *class, int infomethodsubcmd, char *name); -static int XOTclClassInfoMethodsMethod(Tcl_Interp *interp, XOTclClass *object, int withDefined, int withMethodtype, int withNomixins, int withIncontext, char *pattern); +static int XOTclClassInfoMethodsMethod(Tcl_Interp *interp, XOTclClass *object, int withMethodtype, int withNomixins, int withIncontext, char *pattern); static int XOTclClassInfoMixinMethod(Tcl_Interp *interp, XOTclClass *class, int withClosure, int withGuards, char *patternString, XOTclObject *patternObj); static int XOTclClassInfoMixinguardMethod(Tcl_Interp *interp, XOTclClass *class, char *mixin); static int XOTclClassInfoMixinofMethod(Tcl_Interp *interp, XOTclClass *class, int withClosure, char *patternString, XOTclObject *patternObj); static int XOTclClassInfoParameterMethod(Tcl_Interp *interp, XOTclClass *class); static int XOTclClassInfoSlotsMethod(Tcl_Interp *interp, XOTclClass *class); static int XOTclClassInfoSubclassMethod(Tcl_Interp *interp, XOTclClass *class, int withClosure, char *patternString, XOTclObject *patternObj); static int XOTclClassInfoSuperclassMethod(Tcl_Interp *interp, XOTclClass *class, int withClosure, Tcl_Obj *pattern); +static int XOTclObjInfoCallableMethod(Tcl_Interp *interp, XOTclObject *object, int withWhich, int withMethodtype, int withNomixins, int withIncontext, char *pattern); static int XOTclObjInfoCheckMethod(Tcl_Interp *interp, XOTclObject *object); static int XOTclObjInfoChildrenMethod(Tcl_Interp *interp, XOTclObject *object, char *pattern); static int XOTclObjInfoClassMethod(Tcl_Interp *interp, XOTclObject *object); @@ -214,7 +215,7 @@ static int XOTclObjInfoHasnamespaceMethod(Tcl_Interp *interp, XOTclObject *object); static int XOTclObjInfoInvarMethod(Tcl_Interp *interp, XOTclObject *object); static int XOTclObjInfoMethodMethod(Tcl_Interp *interp, XOTclObject *object, int infomethodsubcmd, char *name); -static int XOTclObjInfoMethodsMethod(Tcl_Interp *interp, XOTclObject *object, int withDefined, int withMethodtype, int withNomixins, int withIncontext, char *pattern); +static int XOTclObjInfoMethodsMethod(Tcl_Interp *interp, XOTclObject *object, int withMethodtype, int withNomixins, int withIncontext, char *pattern); static int XOTclObjInfoMixinMethod(Tcl_Interp *interp, XOTclObject *object, int withGuards, int withOrder, char *patternString, XOTclObject *patternObj); static int XOTclObjInfoMixinguardMethod(Tcl_Interp *interp, XOTclObject *object, char *mixin); static int XOTclObjInfoParentMethod(Tcl_Interp *interp, XOTclObject *object); @@ -236,7 +237,6 @@ static int XOTclOMixinGuardMethod(Tcl_Interp *interp, XOTclObject *obj, char *mixin, Tcl_Obj *guard); static int XOTclONextMethod(Tcl_Interp *interp, XOTclObject *obj, int objc, Tcl_Obj *CONST objv[]); static int XOTclONoinitMethod(Tcl_Interp *interp, XOTclObject *obj); -static int XOTclOProcSearchMethod(Tcl_Interp *interp, XOTclObject *obj, char *name); static int XOTclORequireNamespaceMethod(Tcl_Interp *interp, XOTclObject *obj); static int XOTclOResidualargsMethod(Tcl_Interp *interp, XOTclObject *obj, int objc, Tcl_Obj *CONST objv[]); static int XOTclOSetterMethod(Tcl_Interp *interp, XOTclObject *obj, char *name); @@ -294,6 +294,7 @@ XOTclClassInfoSlotsMethodIdx, XOTclClassInfoSubclassMethodIdx, XOTclClassInfoSuperclassMethodIdx, + XOTclObjInfoCallableMethodIdx, XOTclObjInfoCheckMethodIdx, XOTclObjInfoChildrenMethodIdx, XOTclObjInfoClassMethodIdx, @@ -325,7 +326,6 @@ XOTclOMixinGuardMethodIdx, XOTclONextMethodIdx, XOTclONoinitMethodIdx, - XOTclOProcSearchMethodIdx, XOTclORequireNamespaceMethodIdx, XOTclOResidualargsMethodIdx, XOTclOSetterMethodIdx, @@ -835,14 +835,13 @@ return TCL_ERROR; } else { XOTclClass *object = (XOTclClass *)pc.clientData[0]; - int withDefined = (int )pc.clientData[1]; - int withMethodtype = (int )pc.clientData[2]; - int withNomixins = (int )pc.clientData[3]; - int withIncontext = (int )pc.clientData[4]; - char *pattern = (char *)pc.clientData[5]; + int withMethodtype = (int )pc.clientData[1]; + int withNomixins = (int )pc.clientData[2]; + int withIncontext = (int )pc.clientData[3]; + char *pattern = (char *)pc.clientData[4]; parseContextRelease(&pc); - return XOTclClassInfoMethodsMethod(interp, object, withDefined, withMethodtype, withNomixins, withIncontext, pattern); + return XOTclClassInfoMethodsMethod(interp, object, withMethodtype, withNomixins, withIncontext, pattern); } } @@ -1026,6 +1025,29 @@ } static int +XOTclObjInfoCallableMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { + parseContext pc; + + if (ArgumentParse(interp, objc, objv, NULL, objv[0], + method_definitions[XOTclObjInfoCallableMethodIdx].paramDefs, + method_definitions[XOTclObjInfoCallableMethodIdx].nrParameters, + &pc) != TCL_OK) { + return TCL_ERROR; + } else { + XOTclObject *object = (XOTclObject *)pc.clientData[0]; + int withWhich = (int )pc.clientData[1]; + int withMethodtype = (int )pc.clientData[2]; + int withNomixins = (int )pc.clientData[3]; + int withIncontext = (int )pc.clientData[4]; + char *pattern = (char *)pc.clientData[5]; + + parseContextRelease(&pc); + return XOTclObjInfoCallableMethod(interp, object, withWhich, withMethodtype, withNomixins, withIncontext, pattern); + + } +} + +static int XOTclObjInfoCheckMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { parseContext pc; @@ -1207,14 +1229,13 @@ return TCL_ERROR; } else { XOTclObject *object = (XOTclObject *)pc.clientData[0]; - int withDefined = (int )pc.clientData[1]; - int withMethodtype = (int )pc.clientData[2]; - int withNomixins = (int )pc.clientData[3]; - int withIncontext = (int )pc.clientData[4]; - char *pattern = (char *)pc.clientData[5]; + int withMethodtype = (int )pc.clientData[1]; + int withNomixins = (int )pc.clientData[2]; + int withIncontext = (int )pc.clientData[3]; + char *pattern = (char *)pc.clientData[4]; parseContextRelease(&pc); - return XOTclObjInfoMethodsMethod(interp, object, withDefined, withMethodtype, withNomixins, withIncontext, pattern); + return XOTclObjInfoMethodsMethod(interp, object, withMethodtype, withNomixins, withIncontext, pattern); } } @@ -1625,25 +1646,6 @@ } static int -XOTclOProcSearchMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; - XOTclObject *obj = (XOTclObject *)clientData; - if (!obj) return XOTclObjErrType(interp, objv[0], "Object"); - if (ArgumentParse(interp, objc, objv, obj, objv[0], - method_definitions[XOTclOProcSearchMethodIdx].paramDefs, - method_definitions[XOTclOProcSearchMethodIdx].nrParameters, - &pc) != TCL_OK) { - return TCL_ERROR; - } else { - char *name = (char *)pc.clientData[0]; - - parseContextRelease(&pc); - return XOTclOProcSearchMethod(interp, obj, name); - - } -} - -static int XOTclORequireNamespaceMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { parseContext pc; XOTclObject *obj = (XOTclObject *)clientData; @@ -2194,9 +2196,8 @@ {"infomethodsubcmd", 0, 0, convertToInfomethodsubcmd}, {"name", 0, 0, convertToString}} }, -{"::xotcl::cmd::ClassInfo::methods", XOTclClassInfoMethodsMethodStub, 6, { +{"::xotcl::cmd::ClassInfo::methods", XOTclClassInfoMethodsMethodStub, 5, { {"object", 0, 0, convertToClass}, - {"-defined", 0, 0, convertToString}, {"-methodtype", 0, 1, convertToMethodtype}, {"-nomixins", 0, 0, convertToString}, {"-incontext", 0, 0, convertToString}, @@ -2233,6 +2234,14 @@ {"-closure", 0, 0, convertToString}, {"pattern", 0, 0, convertToTclobj}} }, +{"::xotcl::cmd::ObjectInfo::callable", XOTclObjInfoCallableMethodStub, 6, { + {"object", 0, 0, convertToObject}, + {"-which", 0, 0, convertToString}, + {"-methodtype", 0, 1, convertToMethodtype}, + {"-nomixins", 0, 0, convertToString}, + {"-incontext", 0, 0, convertToString}, + {"pattern", 0, 0, convertToString}} +}, {"::xotcl::cmd::ObjectInfo::check", XOTclObjInfoCheckMethodStub, 1, { {"object", 1, 0, convertToObject}} }, @@ -2269,9 +2278,8 @@ {"infomethodsubcmd", 0, 0, convertToInfomethodsubcmd}, {"name", 0, 0, convertToString}} }, -{"::xotcl::cmd::ObjectInfo::methods", XOTclObjInfoMethodsMethodStub, 6, { +{"::xotcl::cmd::ObjectInfo::methods", XOTclObjInfoMethodsMethodStub, 5, { {"object", 0, 0, convertToObject}, - {"-defined", 0, 0, convertToString}, {"-methodtype", 0, 1, convertToMethodtype}, {"-nomixins", 0, 0, convertToString}, {"-incontext", 0, 0, convertToString}, @@ -2366,9 +2374,6 @@ {"::xotcl::cmd::Object::noinit", XOTclONoinitMethodStub, 0, { } }, -{"::xotcl::cmd::Object::procsearch", XOTclOProcSearchMethodStub, 1, { - {"name", 1, 0, convertToString}} -}, {"::xotcl::cmd::Object::requireNamespace", XOTclORequireNamespaceMethodStub, 0, { } }, Index: generic/xotcl.c =================================================================== diff -u -rd5785e8f405e03767db40836127cab24cf8f8b85 -r1f0231a5c7cbb8dfef4eaf78335c9ad571863660 --- generic/xotcl.c (.../xotcl.c) (revision d5785e8f405e03767db40836127cab24cf8f8b85) +++ generic/xotcl.c (.../xotcl.c) (revision 1f0231a5c7cbb8dfef4eaf78335c9ad571863660) @@ -9715,11 +9715,13 @@ case InfomethodsubcmdDefinitionIdx: { XOTclAssertionStore *assertions; + /* don't output -per-object, if object is not a class */ + int outputPerObject = XOTclObjectIsClass(object) ? withPer_object : 0; resultObj = Tcl_NewListObj(0, NULL); /* todo: don't hard-code registering command name "method" */ AppendMethodRegistration(interp, resultObj, "method", object, methodName, cmd, - 0, withPer_object); + 0, outputPerObject); ListCmdParams(interp, cmd, methodName, 0); Tcl_ListObjAppendElement(interp, resultObj, Tcl_GetObjResult(interp)); ListProcBody(interp, GetTclProcFromCommand(cmd), methodName); @@ -11906,24 +11908,6 @@ } -/*static int XOTclOParametercmdMethod(Tcl_Interp *interp, XOTclObject *obj, char *name) { - return XOTclAddObjectMethod(interp, (XOTcl_Object*) obj, name, (Tcl_ObjCmdProc*)XOTclSetterMethod, 0, 0, 0); - }*/ - -static int XOTclOProcSearchMethod(Tcl_Interp *interp, XOTclObject *obj, char *name) { - XOTclClass *pcl = NULL; - Tcl_Command cmd = ObjectFindMethod(interp, obj, name, &pcl); - - Tcl_ResetResult(interp); - - if (cmd) { - XOTclObject *pobj = pcl ? NULL : obj; - char *simpleName = (char *)Tcl_GetCommandName(interp, cmd); - Tcl_SetObjResult(interp, getFullProcQualifier(interp, simpleName, pobj, pcl, cmd)); - } - return TCL_OK; -} - static int XOTclORequireNamespaceMethod(Tcl_Interp *interp, XOTclObject *obj) { requireObjNamespace(interp, obj); return TCL_OK; @@ -12649,20 +12633,40 @@ } static int XOTclClassInfoMethodsMethod(Tcl_Interp *interp, XOTclClass *class, - int withDefined, int withMethodtype, int withNomixins, + int withMethodtype, int withNomixins, int withIncontext, char *pattern) { - return ListMethods(interp, &class->object, pattern, withDefined, 0, + return ListMethods(interp, &class->object, pattern, 1 /*withDefined*/, 0 /* per-object */, AggregatedMethodType(withMethodtype), withNomixins, withIncontext); } static int XOTclObjInfoMethodsMethod(Tcl_Interp *interp, XOTclObject *object, - int withDefined, int withMethodtype, int withNomixins, + int withMethodtype, int withNomixins, int withIncontext, char *pattern) { - return ListMethods(interp, object, pattern, withDefined, 1, + return ListMethods(interp, object, pattern, 1 /*withDefined*/, 1 /* per-object */, AggregatedMethodType(withMethodtype), withNomixins, withIncontext); } +/* todo move me to the right place + cleanup withDefined (above always 1) + xxxx */ +static int XOTclObjInfoCallableMethod(Tcl_Interp *interp, XOTclObject *object, + int withWhich, int withMethodtype, int withNomixins, + int withIncontext, char *pattern) { + if (withWhich) { + XOTclClass *pcl = NULL; + Tcl_Command cmd = ObjectFindMethod(interp, object, pattern, &pcl); + if (cmd) { + XOTclObject *pobj = pcl ? &pcl->object : object; + int perObject = (pcl == NULL); + ListMethod(interp, pobj, pattern, cmd, InfomethodsubcmdDefinitionIdx, perObject); + return TCL_OK; + } + } + return ListMethods(interp, object, pattern, 0 /* withDefined */, 1 /* per-object */, + AggregatedMethodType(withMethodtype), withNomixins, withIncontext); +} + static int XOTclObjInfoMethodMethod(Tcl_Interp *interp, XOTclObject *object, int subcmd, char *methodName) { Tcl_Namespace *nsPtr = object->nsPtr; Index: library/lib/xotcl1.xotcl =================================================================== diff -u -r90358010d417481db6164f879f01b41e789f09f7 -r1f0231a5c7cbb8dfef4eaf78335c9ad571863660 --- library/lib/xotcl1.xotcl (.../xotcl1.xotcl) (revision 90358010d417481db6164f879f01b41e789f09f7) +++ library/lib/xotcl1.xotcl (.../xotcl1.xotcl) (revision 1f0231a5c7cbb8dfef4eaf78335c9ad571863660) @@ -253,16 +253,16 @@ # info options emulated by "info methods" .method instcommands {o {pattern:optional ""}} { - ::xotcl::cmd::ClassInfo::methods $o -defined {*}$pattern + ::xotcl::cmd::ClassInfo::methods $o {*}$pattern } .method instprocs {o {pattern:optional ""}} { - ::xotcl::cmd::ClassInfo::methods $o -defined -methodtype scripted {*}$pattern + ::xotcl::cmd::ClassInfo::methods $o -methodtype scripted {*}$pattern } .method parametercmd {o {pattern:optional ""}} { - ::xotcl::cmd::ClassInfo::methods $o -defined -per-object -methodtype setter {*}$pattern + ::xotcl::cmd::ClassInfo::methods $o -per-object -methodtype setter {*}$pattern } .method instparametercmd {o {pattern:optional ""}} { - ::xotcl::cmd::ClassInfo::methods $o -defined -methodtype setter {*}$pattern + ::xotcl::cmd::ClassInfo::methods $o -methodtype setter {*}$pattern } } @@ -280,18 +280,18 @@ # info options emulated by "info methods" .method commands {o {pattern:optional ""}} { - ::xotcl::cmd::ObjectInfo::methods $o -defined {*}$pattern + ::xotcl::cmd::ObjectInfo::methods $o {*}$pattern } .method procs {o {pattern:optional ""}} { - ::xotcl::cmd::ObjectInfo::methods $o -defined -methodtype scripted {*}$pattern + ::xotcl::cmd::ObjectInfo::methods $o -methodtype scripted {*}$pattern } .method methods { o -nocmds:switch -noprocs:switch -incontext:switch pattern:optional } { set methodtype all if {$nocmds} {set methodtype scripted} if {$noprocs} {if {$nocmds} {return ""}; set methodtype system} - set cmd [list ::xotcl::cmd::ObjectInfo::methods $o -methodtype $methodtype] + set cmd [list ::xotcl::cmd::ObjectInfo::callable $o -methodtype $methodtype] if {$incontext} {lappend cmd -incontext} if {[::info exists pattern]} {lappend cmd $pattern} eval $cmd @@ -300,7 +300,7 @@ foreach cmd [::info command ::xotcl::cmd::ObjectInfo::*] { set cmdName [namespace tail $cmd] - if {$cmdName in [list "method" "methods"]} continue + if {$cmdName in [list "callable" "method" "methods"]} continue ::xotcl::alias ::xotcl::objectInfo $cmdName $cmd ::xotcl::alias ::xotcl::classInfo $cmdName $cmd } @@ -400,6 +400,23 @@ if {[::xotcl::is [self] mixin $cl]} {return 1} ::xotcl::is [self] type $cl } + Object method procsearch {name} { + set definition [::xotcl::cmd::ObjectInfo::callable [self] -which $name] + if {$definition ne ""} { + foreach {obj kind arg} $definition break + set perClass [expr {[::xotcl::is $obj class] && $arg ne "-per-object"}] + switch $kind { + alias {if {$perClass} {set kind "instcmd"} else {set kind "cmd"}} + forward {if {$perClass} {set kind "instforward"}} + mixin {if {$perClass} {set kind "instmixin"}} + method {if {$perClass} {set kind "instproc"} else {set kind "proc"}} + setter {if {$perClass} {set kind "instparametercmd"} else {set kind "parametercmd"}} + default {error "not handeled: $definition"} + } + #puts stderr "return: [list $obj $kind $name]" + return [list $obj $kind $name] + } + } Class method allinstances {} { # TODO: mark it deprecated return [.info instances -closure] Index: library/serialize/Serializer.xotcl =================================================================== diff -u -r9ebd1309a52b27ab92e9e3cce07037767efe4a4f -r1f0231a5c7cbb8dfef4eaf78335c9ad571863660 --- library/serialize/Serializer.xotcl (.../Serializer.xotcl) (revision 9ebd1309a52b27ab92e9e3cce07037767efe4a4f) +++ library/serialize/Serializer.xotcl (.../Serializer.xotcl) (revision 1f0231a5c7cbb8dfef4eaf78335c9ad571863660) @@ -204,14 +204,14 @@ #if {![$o istype ::xotcl::Slot]} {append cmd " -noinit"} append cmd " -noinit" append cmd " \\\n" - foreach i [::xotcl::cmd::ObjectInfo::methods $o -defined -methodtype scripted] { + foreach i [::xotcl::cmd::ObjectInfo::methods $o -methodtype scripted] { append cmd " " [my method-serialize $o $i ""] " \\\n" } - foreach i [::xotcl::cmd::ObjectInfo::methods $o -defined -methodtype forward] { + foreach i [::xotcl::cmd::ObjectInfo::methods $o -methodtype forward] { set fwd [concat [list forward $i] [$o info forward -definition $i]] append cmd \t [my pcmd $fwd] " \\\n" } - foreach i [::xotcl::cmd::ObjectInfo::methods $o -defined -methodtype setter] { + foreach i [::xotcl::cmd::ObjectInfo::methods $o -methodtype setter] { append cmd \t [my pcmd [list parametercmd $i]] " \\\n" } set vset {} @@ -434,7 +434,7 @@ set code "" switch $kind { proc { - if {[$object info methods -defined -nocmd $name] ne ""} { + if {[$object info methods -nocmd $name] ne ""} { set code [my method-serialize $object $name ""] } } Index: tests/aliastest.xotcl =================================================================== diff -u -rd5785e8f405e03767db40836127cab24cf8f8b85 -r1f0231a5c7cbb8dfef4eaf78335c9ad571863660 --- tests/aliastest.xotcl (.../aliastest.xotcl) (revision d5785e8f405e03767db40836127cab24cf8f8b85) +++ tests/aliastest.xotcl (.../aliastest.xotcl) (revision 1f0231a5c7cbb8dfef4eaf78335c9ad571863660) @@ -16,7 +16,7 @@ ::xotcl::use xotcl2 # the system methods of Object are either alias or forwarders -? {lsort [::xotcl::Slot info methods -defined -methodtype alias]} {assign get} +? {lsort [::xotcl::Slot info methods -methodtype alias]} {assign get} ? {::xotcl::Slot info method definition get} "::xotcl::Slot alias get ::xotcl::setinstvar" set cmd "::xotcl2::Object alias -objscope set ::set" @@ -34,25 +34,25 @@ Foo create f1 ? {f1 foo} 1 ? {f1 foo -x 2} 2 -? {Foo info methods -defined -methodtype alias} "foo" +? {Foo info methods -methodtype alias} "foo" -? {Base info methods -defined -methodtype scripted} {foo} -? {Foo info methods -defined -methodtype scripted} {foo} +? {Base info methods -methodtype scripted} {foo} +? {Foo info methods -methodtype scripted} {foo} Base method foo {} {} -? {Foo info methods -defined -methodtype alias} "" -? {Base info methods -defined -methodtype scripted} {} -? {Foo info methods -defined -methodtype scripted} {} +? {Foo info methods -methodtype alias} "" +? {Base info methods -methodtype scripted} {} +? {Foo info methods -methodtype scripted} {} ? {Foo info method definition foo} "" Base method foo {{-x 1}} {return $x} ::xotcl::alias ::Foo foo ::xotcl::classes::Base::foo -? {Base info methods -defined -methodtype scripted} {foo} "defined again" -? {Foo info methods -defined -methodtype scripted} {foo} "aliased again" +? {Base info methods -methodtype scripted} {foo} "defined again" +? {Foo info methods -methodtype scripted} {foo} "aliased again" Foo method foo {} {} -? {Base info methods -defined -methodtype scripted} {foo} "still defined" -? {Foo info methods -defined -methodtype scripted} {} "removed" +? {Base info methods -methodtype scripted} {foo} "still defined" +? {Foo info methods -methodtype scripted} {} "removed" # # chaining aliases @@ -70,49 +70,49 @@ ? {t foo} ::T->foo ? {t FOO} ::T->foo -? {lsort [T info methods -defined -methodtype scripted]} {FOO foo} +? {lsort [T info methods -methodtype scripted]} {FOO foo} T method foo {} {} -? {lsort [T info methods -defined -methodtype scripted]} {} "alias is deleted" +? {lsort [T info methods -methodtype scripted]} {} "alias is deleted" # puts stderr "double indirection" T method foo args { return [self class]->[self proc] } ::xotcl::alias T FOO ::xotcl::classes::T::foo ::xotcl::alias S BAR ::xotcl::classes::T::FOO -? {T info methods -defined -methodtype alias} "FOO" +? {T info methods -methodtype alias} "FOO" ? {T info method definition FOO} "::T alias FOO ::xotcl::classes::T::foo" -? {lsort [T info methods -defined -methodtype scripted]} {FOO foo} -? {S info methods -defined -methodtype scripted} {BAR} +? {lsort [T info methods -methodtype scripted]} {FOO foo} +? {S info methods -methodtype scripted} {BAR} T method FOO {} {} -? {T info methods -defined -methodtype scripted} {foo} -? {S info methods -defined -methodtype scripted} {BAR} +? {T info methods -methodtype scripted} {foo} +? {S info methods -methodtype scripted} {BAR} ? {s BAR} ::S->foo ? {t foo} ::T->foo ? {S info method definition BAR} "::S alias BAR ::xotcl::classes::T::FOO" T method foo {} {} -? {T info methods -defined -methodtype scripted} {} -? {S info methods -defined -methodtype scripted} {} +? {T info methods -methodtype scripted} {} +? {S info methods -methodtype scripted} {} T method foo args { return [self class]->[self proc] } ::xotcl::alias T FOO ::xotcl::classes::T::foo ::xotcl::alias S BAR ::xotcl::classes::T::FOO -? {lsort [T info methods -defined -methodtype scripted]} {FOO foo} -? {S info methods -defined -methodtype scripted} {BAR} +? {lsort [T info methods -methodtype scripted]} {FOO foo} +? {S info methods -methodtype scripted} {BAR} T method foo {} {} -? {S info methods -defined -methodtype scripted} {} -? {T info methods -defined -methodtype scripted} {} +? {S info methods -methodtype scripted} {} +? {T info methods -methodtype scripted} {} T method foo args { return [self class]->[self proc] } T method -per-object bar args { return [self class]->[self proc] } ::xotcl::alias T FOO -per-object ::xotcl::classes::T::foo ::xotcl::alias T BAR -per-object ::T::FOO ::xotcl::alias T ZAP -per-object ::T::BAR -? {T info methods -defined -methodtype scripted} {foo} -? {lsort [T info -per-object methods -defined -methodtype alias]} {BAR FOO ZAP} -? {lsort [T info -per-object methods -defined -methodtype scripted]} {BAR FOO ZAP bar} +? {T info methods -methodtype scripted} {foo} +? {lsort [T info -per-object methods -methodtype alias]} {BAR FOO ZAP} +? {lsort [T info -per-object methods -methodtype scripted]} {BAR FOO ZAP bar} ? {t foo} ::T->foo ? {T info -per-object method definition ZAP} {::T alias -per-object ZAP ::T::BAR} @@ -121,39 +121,39 @@ ? {T ZAP} ->foo ? {T bar} ->bar T method -per-object FOO {} {} -? {T info methods -defined -methodtype scripted} {foo} -? {lsort [T info -per-object methods -defined -methodtype scripted]} {BAR ZAP bar} +? {T info methods -methodtype scripted} {foo} +? {lsort [T info -per-object methods -methodtype scripted]} {BAR ZAP bar} ? {T BAR} ->foo ? {T ZAP} ->foo rename ::T::BAR "" -? {T info methods -defined -methodtype scripted} {foo} -? {lsort [T info -per-object methods -defined -methodtype scripted]} {ZAP bar} +? {T info methods -methodtype scripted} {foo} +? {lsort [T info -per-object methods -methodtype scripted]} {ZAP bar} #? {T BAR} ""; # now calling the proc defined above, alias chain seems intact ? {T ZAP} ->foo; # is ok, still pointing to 'foo' #T method -per-object BAR {} {} -? {T info methods -defined -methodtype scripted} {foo} -? {lsort [T info -per-object methods -defined -methodtype scripted]} {ZAP bar} +? {T info methods -methodtype scripted} {foo} +? {lsort [T info -per-object methods -methodtype scripted]} {ZAP bar} ? {T ZAP} ->foo T method foo {} {} -? {T info methods -defined -methodtype scripted} {} -? {lsort [T info -per-object methods -defined -methodtype scripted]} {bar} +? {T info methods -methodtype scripted} {} +? {lsort [T info -per-object methods -methodtype scripted]} {bar} # # per-object methods as per-object aliases # T method -per-object m1 args { return [self class]->[self proc] } ::xotcl::alias T M1 -per-object ::T::m1 ::xotcl::alias T M11 -per-object ::T::M1 -? {lsort [T info -per-object methods -defined -methodtype scripted]} {M1 M11 bar m1} +? {lsort [T info -per-object methods -methodtype scripted]} {M1 M11 bar m1} ? {T m1} ->m1 ? {T M1} ->m1 ? {T M11} ->m1 T method -per-object M1 {} {} -? {lsort [T info -per-object methods -defined -methodtype scripted]} {M11 bar m1} +? {lsort [T info -per-object methods -methodtype scripted]} {M11 bar m1} ? {T m1} ->m1 ? {T M11} ->m1 T method -per-object m1 {} {} -? {lsort [T info -per-object methods -defined -methodtype scripted]} {bar} +? {lsort [T info -per-object methods -methodtype scripted]} {bar} # # a proc as alias @@ -166,17 +166,17 @@ # ! per-object alias referenced as per-class alias ! # ::xotcl::alias T BAR ::T::FOO2 -? {lsort [T info -per-object methods -defined -methodtype scripted]} {FOO2 bar} -? {lsort [T info methods -defined -methodtype scripted]} {BAR FOO1} +? {lsort [T info -per-object methods -methodtype scripted]} {FOO2 bar} +? {lsort [T info methods -methodtype scripted]} {BAR FOO1} ? {T FOO2} ->foo ? {t FOO1} ::T->foo ? {t BAR} ::T->foo # # delete proc # rename foo "" -? {lsort [T info -per-object methods -defined -methodtype scripted]} {bar} -? {lsort [T info methods -defined -methodtype scripted]} {} +? {lsort [T info -per-object methods -methodtype scripted]} {bar} +? {lsort [T info methods -methodtype scripted]} {} # namespaced procs + namespace deletion @@ -189,14 +189,14 @@ ::xotcl::alias T FOO ::ns1::foo ::xotcl::alias T BAR ::ns1::bar ::xotcl::alias T BAR2 ::ns1::bar2 -? {lsort [T info methods -defined -methodtype scripted]} {BAR BAR2 FOO} +? {lsort [T info methods -methodtype scripted]} {BAR BAR2 FOO} set _ GOTYA ? {t FOO} ::T->foo ? {t BAR} GOTYA ? {t BAR2} GOTYA namespace delete ::ns1 ? {info procs ::ns1::*} {} -? {lsort [T info methods -defined -methodtype scripted]} {} +? {lsort [T info methods -methodtype scripted]} {} # per-object namespaces @@ -210,14 +210,14 @@ U method -per-object bar args { return [self class]->[self proc] } ::xotcl::alias U BAR -per-object ::U::bar -? {lsort [U info -per-object methods -defined -methodtype scripted]} {BAR ZAP bar zap} +? {lsort [U info -per-object methods -methodtype scripted]} {BAR ZAP bar zap} ? {U BAR} ->bar ? {U ZAP} ->zap namespace delete ::U ? {namespace exists ::U} 0 -? {lsort [U info -per-object methods -defined -methodtype scripted]} {} -? {U procsearch BAR} "" -? {U procsearch ZAP} "" +? {lsort [U info -per-object methods -methodtype scripted]} {} +? {U info callable BAR} "" +? {U info callable ZAP} "" ::U destroy @@ -238,14 +238,14 @@ ::xotcl::alias V FOO1 ::foo ::xotcl::alias V FOO2 -per-object ::foo -? {lsort [V info -per-object methods -defined -methodtype scripted]} {FOO2 bar} -? {lsort [V info methods -defined -methodtype scripted]} {FOO1 bar} +? {lsort [V info -per-object methods -methodtype scripted]} {FOO2 bar} +? {lsort [V info methods -methodtype scripted]} {FOO1 bar} ? {V FOO2} 1-1-1 ? {v FOO1} 2-2-2 V method FOO1 {} {} -? {lsort [V info methods -defined -methodtype scripted]} {bar} +? {lsort [V info methods -methodtype scripted]} {bar} rename ::foo "" -? {lsort [V info -per-object methods -defined -methodtype scripted]} {bar} +? {lsort [V info -per-object methods -methodtype scripted]} {bar} # @@ -334,9 +334,9 @@ unset ::xotcl::alias(::C,FOO,0) ? {info exists ::xotcl::alias(::C,FOO,0)} 0 ? {C info method definition FOO} "" -? {C info methods -defined -methodtype alias} FOO +? {C info methods -methodtype alias} FOO rename ::foo "" -? {C info methods -defined -methodtype alias} "" +? {C info methods -methodtype alias} "" ? {info exists ::xotcl::alias(::C,FOO,0)} 0 ? {C info method definition FOO} "" @@ -353,10 +353,10 @@ ? {info exists ::xotcl::alias(::C,FOO,0)} 0 ::xotcl::alias C FOO ::foo ? {info exists ::xotcl::alias(::C,FOO,0)} 1 -? {C info methods -defined -methodtype alias} FOO +? {C info methods -methodtype alias} FOO rename ::foo ::foo2 ? {info exists ::xotcl::alias(::C,FOO,0)} 1 -? {C info methods -defined -methodtype alias} FOO +? {C info methods -methodtype alias} FOO ? {c FOO} ::c->foo2 ? {C info method definition FOO} "::C alias FOO ::foo"; # should be ::foo2 (!) Index: tests/info-method.xotcl =================================================================== diff -u -re591522c92d208c4942888e632546262fd7641ad -r1f0231a5c7cbb8dfef4eaf78335c9ad571863660 --- tests/info-method.xotcl (.../info-method.xotcl) (revision e591522c92d208c4942888e632546262fd7641ad) +++ tests/info-method.xotcl (.../info-method.xotcl) (revision 1f0231a5c7cbb8dfef4eaf78335c9ad571863660) @@ -33,8 +33,20 @@ .alias a ::set .alias -per-object apo ::puts } +C create c1 -? {lsort [C info methods -defined]} "a addOne m m-with-assertions s" +? {lsort [C info methods]} "a addOne m m-with-assertions s" +foreach m [lsort [C info methods]] { + ? {lsort [c1 info callable $m]} $m +} +? {C info method definition a} "::C alias a ::set" +? {c1 info callable -which a} "::C alias a ::set" +? {c1 info callable -which addOne} "::C forward addOne expr 1 +" +? {c1 info callable -which m} {::C method m x {return proc-[self proc]}} +? {c1 info callable -which s} "::C setter s" +c1 method foo {} {puts foo} +? {c1 info method definition foo} "::c1 method foo {} {puts foo}" +? {c1 info callable -which foo} "::c1 method foo {} {puts foo}" ? {C info method name m} "::xotcl::classes::C::m" ? {C info -per-object method name mpo} "::C::mpo" Index: tests/interceptor-slot.xotcl =================================================================== diff -u -rc495d1832cbd2bf781a8994aa983f1d35dd05bbd -r1f0231a5c7cbb8dfef4eaf78335c9ad571863660 --- tests/interceptor-slot.xotcl (.../interceptor-slot.xotcl) (revision c495d1832cbd2bf781a8994aa983f1d35dd05bbd) +++ tests/interceptor-slot.xotcl (.../interceptor-slot.xotcl) (revision 1f0231a5c7cbb8dfef4eaf78335c9ad571863660) @@ -20,7 +20,7 @@ } Class create M2 Class create C -? {C procsearch mixin} "::xotcl2::Object instforward mixin" +? {C info callable -which mixin} "::xotcl2::Object forward mixin ::xotcl2::Object::slot::mixin {%1 {get assign}} %self {%-per-object 0} %proc" C mixin M ? {C info precedence} "::xotcl2::Class ::xotcl2::Object" ? {C mixin} "::M" Index: tests/testx.xotcl =================================================================== diff -u -rd5785e8f405e03767db40836127cab24cf8f8b85 -r1f0231a5c7cbb8dfef4eaf78335c9ad571863660 --- tests/testx.xotcl (.../testx.xotcl) (revision d5785e8f405e03767db40836127cab24cf8f8b85) +++ tests/testx.xotcl (.../testx.xotcl) (revision 1f0231a5c7cbb8dfef4eaf78335c9ad571863660) @@ -1349,11 +1349,11 @@ set r [anObject aProc] if {$i > 0} { ::errorCheck $InfoTraceResult \ - "{::aClass-::xotcl::objectInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, check, children, class, commands, default, filter, filterguard, forward, hasnamespace, info, invar, is, method, methods, mixin, mixinguard, nonposargs, parametercmd, parent, post, pre, precedence, procs, slotobjects, vars-class} info-::anotherObject {::xotcl::Object-::xotcl::Object instfilter infoTraceFilter}} {-::anotherObject-infoTraceFilter-::xotcl::Object ::aClass-cleanup aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::aClass-::xotcl::objectInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, check, children, class, commands, default, filter, filterguard, forward, hasnamespace, info, invar, is, method, methods, mixin, mixinguard, nonposargs, parametercmd, parent, post, pre, precedence, procs, slotobjects, vars-class} info-::anotherObject {::xotcl::Object-::xotcl::Object instfilter infoTraceFilter}} {-::anotherObject-infoTraceFilter-::xotcl::Object ::aClass-residualargs aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::aClass-::xotcl::objectInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, check, children, class, commands, default, filter, filterguard, forward, hasnamespace, info, invar, is, method, methods, mixin, mixinguard, nonposargs, parametercmd, parent, post, pre, precedence, procs, slotobjects, vars-class} info-::anotherObject {::xotcl::Object-::xotcl::Object instfilter infoTraceFilter}} {-::anotherObject-infoTraceFilter-::xotcl::Object ::aClass-configure aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::aClass-::xotcl::objectInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, check, children, class, commands, default, filter, filterguard, forward, hasnamespace, info, invar, is, method, methods, mixin, mixinguard, nonposargs, parametercmd, parent, post, pre, precedence, procs, slotobjects, vars-class} info-::anotherObject {::xotcl::Object-::xotcl::Object instfilter infoTraceFilter}} {-::anotherObject-infoTraceFilter-::xotcl::Object ::aClass-init aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::xotcl::Class-::xotcl::classInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, check, children, class, classchildren, classparent, commands, default, filter, filterguard, forward, hasnamespace, heritage, info, instances, instargs, instbody, instcommands, instdefault, instfilter, instfilterguard, instforward, instinvar, instmixin, instmixinguard, instmixinof, instnonposargs, instparametercmd, instpost, instpre, instprocs, invar, is, method, methods, mixin, mixinguard, mixinof, nonposargs, parameter, parametercmd, parent, post, pre, precedence, procs, slotobjects, slots, subclass, superclass, vars-class} info-::aClass {::xotcl::Class-::xotcl::Object instfilter infoTraceFilter}} {::anotherObject-::aClass-infoTraceFilter-::xotcl::Object ::xotcl::Class-recreate aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::xotcl::Class-::xotcl::classInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, check, children, class, classchildren, classparent, commands, default, filter, filterguard, forward, hasnamespace, heritage, info, instances, instargs, instbody, instcommands, instdefault, instfilter, instfilterguard, instforward, instinvar, instmixin, instmixinguard, instmixinof, instnonposargs, instparametercmd, instpost, instpre, instprocs, invar, is, method, methods, mixin, mixinguard, mixinof, nonposargs, parameter, parametercmd, parent, post, pre, precedence, procs, slotobjects, slots, subclass, superclass, vars-class} info-::aClass {::xotcl::Class-::xotcl::Object instfilter infoTraceFilter}} {::anotherObject-::aClass-infoTraceFilter-::xotcl::Object ::xotcl::Class-create aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::ObjectsClass-::xotcl::objectInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, check, children, class, commands, default, filter, filterguard, forward, hasnamespace, info, invar, is, method, methods, mixin, mixinguard, nonposargs, parametercmd, parent, post, pre, precedence, procs, slotobjects, vars-class} info-::anObject {::xotcl::Object-::xotcl::Object instfilter infoTraceFilter}} {::anotherObject-::anObject-infoTraceFilter-::xotcl::Object ::ObjectsClass-aProc run-::filterInfo {-::xotcl::Object instfilter infoTraceFilter}}" \ + "{::aClass-::xotcl::objectInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, callable, check, children, class, commands, default, filter, filterguard, forward, hasnamespace, info, invar, is, method, methods, mixin, mixinguard, nonposargs, parametercmd, parent, post, pre, precedence, procs, slotobjects, vars-class} info-::anotherObject {::xotcl::Object-::xotcl::Object instfilter infoTraceFilter}} {-::anotherObject-infoTraceFilter-::xotcl::Object ::aClass-cleanup aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::aClass-::xotcl::objectInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, callable, check, children, class, commands, default, filter, filterguard, forward, hasnamespace, info, invar, is, method, methods, mixin, mixinguard, nonposargs, parametercmd, parent, post, pre, precedence, procs, slotobjects, vars-class} info-::anotherObject {::xotcl::Object-::xotcl::Object instfilter infoTraceFilter}} {-::anotherObject-infoTraceFilter-::xotcl::Object ::aClass-residualargs aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::aClass-::xotcl::objectInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, callable, check, children, class, commands, default, filter, filterguard, forward, hasnamespace, info, invar, is, method, methods, mixin, mixinguard, nonposargs, parametercmd, parent, post, pre, precedence, procs, slotobjects, vars-class} info-::anotherObject {::xotcl::Object-::xotcl::Object instfilter infoTraceFilter}} {-::anotherObject-infoTraceFilter-::xotcl::Object ::aClass-configure aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::aClass-::xotcl::objectInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, callable, check, children, class, commands, default, filter, filterguard, forward, hasnamespace, info, invar, is, method, methods, mixin, mixinguard, nonposargs, parametercmd, parent, post, pre, precedence, procs, slotobjects, vars-class} info-::anotherObject {::xotcl::Object-::xotcl::Object instfilter infoTraceFilter}} {-::anotherObject-infoTraceFilter-::xotcl::Object ::aClass-init aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::xotcl::Class-::xotcl::classInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, callable, check, children, class, classchildren, classparent, commands, default, filter, filterguard, forward, hasnamespace, heritage, info, instances, instargs, instbody, instcommands, instdefault, instfilter, instfilterguard, instforward, instinvar, instmixin, instmixinguard, instmixinof, instnonposargs, instparametercmd, instpost, instpre, instprocs, invar, is, method, methods, mixin, mixinguard, mixinof, nonposargs, parameter, parametercmd, parent, post, pre, precedence, procs, slotobjects, slots, subclass, superclass, vars-class} info-::aClass {::xotcl::Class-::xotcl::Object instfilter infoTraceFilter}} {::anotherObject-::aClass-infoTraceFilter-::xotcl::Object ::xotcl::Class-recreate aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::xotcl::Class-::xotcl::classInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, callable, check, children, class, classchildren, classparent, commands, default, filter, filterguard, forward, hasnamespace, heritage, info, instances, instargs, instbody, instcommands, instdefault, instfilter, instfilterguard, instforward, instinvar, instmixin, instmixinguard, instmixinof, instnonposargs, instparametercmd, instpost, instpre, instprocs, invar, is, method, methods, mixin, mixinguard, mixinof, nonposargs, parameter, parametercmd, parent, post, pre, precedence, procs, slotobjects, slots, subclass, superclass, vars-class} info-::aClass {::xotcl::Class-::xotcl::Object instfilter infoTraceFilter}} {::anotherObject-::aClass-infoTraceFilter-::xotcl::Object ::xotcl::Class-create aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::ObjectsClass-::xotcl::objectInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, callable, check, children, class, commands, default, filter, filterguard, forward, hasnamespace, info, invar, is, method, methods, mixin, mixinguard, nonposargs, parametercmd, parent, post, pre, precedence, procs, slotobjects, vars-class} info-::anObject {::xotcl::Object-::xotcl::Object instfilter infoTraceFilter}} {::anotherObject-::anObject-infoTraceFilter-::xotcl::Object ::ObjectsClass-aProc run-::filterInfo {-::xotcl::Object instfilter infoTraceFilter}}" \ "FilterInfo InfoTrace: Filter information wrong (b)" } else { ::errorCheck $InfoTraceResult \ - "{::xotcl::Class-::xotcl::classInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, check, children, class, classchildren, classparent, commands, default, filter, filterguard, forward, hasnamespace, heritage, info, instances, instargs, instbody, instcommands, instdefault, instfilter, instfilterguard, instforward, instinvar, instmixin, instmixinguard, instmixinof, instnonposargs, instparametercmd, instpost, instpre, instprocs, invar, is, method, methods, mixin, mixinguard, mixinof, nonposargs, parameter, parametercmd, parent, post, pre, precedence, procs, slotobjects, slots, subclass, superclass, vars-class} info-::aClass {::xotcl::Class-::xotcl::Object instfilter infoTraceFilter}} {::anotherObject-::aClass-infoTraceFilter-::xotcl::Object ::xotcl::Class-alloc aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::aClass-::xotcl::objectInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, check, children, class, commands, default, filter, filterguard, forward, hasnamespace, info, invar, is, method, methods, mixin, mixinguard, nonposargs, parametercmd, parent, post, pre, precedence, procs, slotobjects, vars-class} info-::anotherObject {::xotcl::Object-::xotcl::Object instfilter infoTraceFilter}} {-::anotherObject-infoTraceFilter-::xotcl::Object ::aClass-residualargs aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::aClass-::xotcl::objectInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, check, children, class, commands, default, filter, filterguard, forward, hasnamespace, info, invar, is, method, methods, mixin, mixinguard, nonposargs, parametercmd, parent, post, pre, precedence, procs, slotobjects, vars-class} info-::anotherObject {::xotcl::Object-::xotcl::Object instfilter infoTraceFilter}} {-::anotherObject-infoTraceFilter-::xotcl::Object ::aClass-configure aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::aClass-::xotcl::objectInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, check, children, class, commands, default, filter, filterguard, forward, hasnamespace, info, invar, is, method, methods, mixin, mixinguard, nonposargs, parametercmd, parent, post, pre, precedence, procs, slotobjects, vars-class} info-::anotherObject {::xotcl::Object-::xotcl::Object instfilter infoTraceFilter}} {-::anotherObject-infoTraceFilter-::xotcl::Object ::aClass-init aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::xotcl::Class-::xotcl::classInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, check, children, class, classchildren, classparent, commands, default, filter, filterguard, forward, hasnamespace, heritage, info, instances, instargs, instbody, instcommands, instdefault, instfilter, instfilterguard, instforward, instinvar, instmixin, instmixinguard, instmixinof, instnonposargs, instparametercmd, instpost, instpre, instprocs, invar, is, method, methods, mixin, mixinguard, mixinof, nonposargs, parameter, parametercmd, parent, post, pre, precedence, procs, slotobjects, slots, subclass, superclass, vars-class} info-::aClass {::xotcl::Class-::xotcl::Object instfilter infoTraceFilter}} {::anotherObject-::aClass-infoTraceFilter-::xotcl::Object ::xotcl::Class-create aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::ObjectsClass-::xotcl::objectInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, check, children, class, commands, default, filter, filterguard, forward, hasnamespace, info, invar, is, method, methods, mixin, mixinguard, nonposargs, parametercmd, parent, post, pre, precedence, procs, slotobjects, vars-class} info-::anObject {::xotcl::Object-::xotcl::Object instfilter infoTraceFilter}} {::anotherObject-::anObject-infoTraceFilter-::xotcl::Object ::ObjectsClass-aProc run-::filterInfo {-::xotcl::Object instfilter infoTraceFilter}}" \ + "{::xotcl::Class-::xotcl::classInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, callable, check, children, class, classchildren, classparent, commands, default, filter, filterguard, forward, hasnamespace, heritage, info, instances, instargs, instbody, instcommands, instdefault, instfilter, instfilterguard, instforward, instinvar, instmixin, instmixinguard, instmixinof, instnonposargs, instparametercmd, instpost, instpre, instprocs, invar, is, method, methods, mixin, mixinguard, mixinof, nonposargs, parameter, parametercmd, parent, post, pre, precedence, procs, slotobjects, slots, subclass, superclass, vars-class} info-::aClass {::xotcl::Class-::xotcl::Object instfilter infoTraceFilter}} {::anotherObject-::aClass-infoTraceFilter-::xotcl::Object ::xotcl::Class-alloc aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::aClass-::xotcl::objectInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, callable, check, children, class, commands, default, filter, filterguard, forward, hasnamespace, info, invar, is, method, methods, mixin, mixinguard, nonposargs, parametercmd, parent, post, pre, precedence, procs, slotobjects, vars-class} info-::anotherObject {::xotcl::Object-::xotcl::Object instfilter infoTraceFilter}} {-::anotherObject-infoTraceFilter-::xotcl::Object ::aClass-residualargs aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::aClass-::xotcl::objectInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, callable, check, children, class, commands, default, filter, filterguard, forward, hasnamespace, info, invar, is, method, methods, mixin, mixinguard, nonposargs, parametercmd, parent, post, pre, precedence, procs, slotobjects, vars-class} info-::anotherObject {::xotcl::Object-::xotcl::Object instfilter infoTraceFilter}} {-::anotherObject-infoTraceFilter-::xotcl::Object ::aClass-configure aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::aClass-::xotcl::objectInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, callable, check, children, class, commands, default, filter, filterguard, forward, hasnamespace, info, invar, is, method, methods, mixin, mixinguard, nonposargs, parametercmd, parent, post, pre, precedence, procs, slotobjects, vars-class} info-::anotherObject {::xotcl::Object-::xotcl::Object instfilter infoTraceFilter}} {-::anotherObject-infoTraceFilter-::xotcl::Object ::aClass-init aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::xotcl::Class-::xotcl::classInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, callable, check, children, class, classchildren, classparent, commands, default, filter, filterguard, forward, hasnamespace, heritage, info, instances, instargs, instbody, instcommands, instdefault, instfilter, instfilterguard, instforward, instinvar, instmixin, instmixinguard, instmixinof, instnonposargs, instparametercmd, instpost, instpre, instprocs, invar, is, method, methods, mixin, mixinguard, mixinof, nonposargs, parameter, parametercmd, parent, post, pre, precedence, procs, slotobjects, slots, subclass, superclass, vars-class} info-::aClass {::xotcl::Class-::xotcl::Object instfilter infoTraceFilter}} {::anotherObject-::aClass-infoTraceFilter-::xotcl::Object ::xotcl::Class-create aProc-::anObject {::ObjectsClass-::xotcl::Object instfilter infoTraceFilter}} {::ObjectsClass-::xotcl::objectInfo-infoTraceFilter-::xotcl::Object {valid options are: args, body, callable, check, children, class, commands, default, filter, filterguard, forward, hasnamespace, info, invar, is, method, methods, mixin, mixinguard, nonposargs, parametercmd, parent, post, pre, precedence, procs, slotobjects, vars-class} info-::anObject {::xotcl::Object-::xotcl::Object instfilter infoTraceFilter}} {::anotherObject-::anObject-infoTraceFilter-::xotcl::Object ::ObjectsClass-aProc run-::filterInfo {-::xotcl::Object instfilter infoTraceFilter}}" \ "FilterInfo InfoTrace: Filter information wrong" } } @@ -3103,13 +3103,13 @@ ::errorCheck [lsort [b info methods]] "__next abstract append array autoname check class cleanup configure contains copy defaultmethod destroy eval exists extractConfigureArg f filter filterguard filtersearch forward hasclass incr info init instvar invar isclass ismetaclass ismixin isobject istype lappend method mixin mixinguard move myProc myProc2 myProcMix1 myProcMix2 noinit objectparameter objproc parametercmd proc procsearch requireNamespace residualargs self set setFilter setter signature subst trace unknown unset uplevel upvar volatile vwait" "b info methods" - ::errorCheck [lsort [b info methods -nocmds]] "abstract contains copy defaultmethod extractConfigureArg f hasclass init isclass ismetaclass ismixin isobject istype move myProc myProc2 myProcMix1 myProcMix2 objectparameter objproc proc self setFilter signature unknown" "b info methods -nocmds" + ::errorCheck [lsort [b info methods -nocmds]] "abstract contains copy defaultmethod extractConfigureArg f hasclass init isclass ismetaclass ismixin isobject istype move myProc myProc2 myProcMix1 myProcMix2 objectparameter objproc proc procsearch self setFilter signature unknown" "b info methods -nocmds" - ::errorCheck [lsort [b info methods -noprocs]] "__next append array autoname check class cleanup configure destroy eval exists filter filterguard filtersearch forward incr info instvar invar lappend method mixin mixinguard noinit parametercmd procsearch requireNamespace residualargs set setter subst trace unset uplevel upvar volatile vwait" "b info methods -noprocs" - ::errorCheck [lsort [b info methods -nocmds -nomixins]] "abstract contains copy defaultmethod extractConfigureArg f hasclass init isclass ismetaclass ismixin isobject istype move myProc myProc2 objectparameter objproc proc self setFilter signature unknown" "b info methods -nocmds -nomixins" + ::errorCheck [lsort [b info methods -noprocs]] "__next append array autoname check class cleanup configure destroy eval exists filter filterguard filtersearch forward incr info instvar invar lappend method mixin mixinguard noinit parametercmd requireNamespace residualargs set setter subst trace unset uplevel upvar volatile vwait" "b info methods -noprocs" + ::errorCheck [lsort [b info methods -nocmds -nomixins]] "abstract contains copy defaultmethod extractConfigureArg f hasclass init isclass ismetaclass ismixin isobject istype move myProc myProc2 objectparameter objproc proc procsearch self setFilter signature unknown" "b info methods -nocmds -nomixins" ::errorCheck [b info methods -nocmds -noprocs] "" "b info methods -nocmds -noprocs" - ::errorCheck [lsort [B info methods -nocmds]] "abstract allinstances contains copy defaultmethod extractConfigureArg f hasclass init instproc isclass ismetaclass ismixin isobject istype move objectparameter parameter proc self setFilter signature unknown uses" "B info methods -nocmds" + ::errorCheck [lsort [B info methods -nocmds]] "abstract allinstances contains copy defaultmethod extractConfigureArg f hasclass init instproc isclass ismetaclass ismixin isobject istype move objectparameter parameter proc procsearch self setFilter signature unknown uses" "B info methods -nocmds" namespace eval a { proc o args {return o}