Index: TODO =================================================================== diff -u -rbc9096dbfe6718828baf2359730f098d66598065 -r38f8651fe4c101ee7ad98aa46bcadc32459bfdc7 --- TODO (.../TODO) (revision bc9096dbfe6718828baf2359730f098d66598065) +++ TODO (.../TODO) (revision 38f8651fe4c101ee7ad98aa46bcadc32459bfdc7) @@ -1376,6 +1376,8 @@ ensemble does not contain the called submethod - added regression tests for partial ensembles +- renamed "... info ... subcommands ..." into "... submethods ..." + TODO: - subcmd * handle sucmd for other method factories Index: generic/gentclAPI.decls =================================================================== diff -u -ra3b0e40438f4c944dac1c34387f4292e012f4bd0 -r38f8651fe4c101ee7ad98aa46bcadc32459bfdc7 --- generic/gentclAPI.decls (.../gentclAPI.decls) (revision a3b0e40438f4c944dac1c34387f4292e012f4bd0) +++ generic/gentclAPI.decls (.../gentclAPI.decls) (revision 38f8651fe4c101ee7ad98aa46bcadc32459bfdc7) @@ -30,7 +30,6 @@ {-argName "assertionsubcmd" -required 1 -type "check|object-invar|class-invar"} {-argName "arg" -required 0 -type tclobj} } - nsfCmd configure NsfConfigureCmd { {-argName "configureoption" -required 1 -type "filter|softrecreate|objectsystems|keepinitcmd|checkresults|checkarguments"} {-argName "value" -required 0 -type tclobj} @@ -261,7 +260,7 @@ {-argName "-type" -required 0 -nrargs 1 -type class} } objectInfoMethod method NsfObjInfoMethodMethod { - {-argName "infomethodsubcmd" -type "args|body|definition|handle|parameter|parametersyntax|type|precondition|postcondition|subcommands"} + {-argName "infomethodsubcmd" -type "args|body|definition|handle|parameter|parametersyntax|type|precondition|postcondition|submethods"} {-argName "name" -type tclobj} } objectInfoMethod methods NsfObjInfoMethodsMethod { @@ -313,7 +312,7 @@ } classInfoMethod method NsfClassInfoMethodMethod { - {-argName "infomethodsubcmd" -type "args|body|definition|handle|parameter|parametersyntax|type|precondition|postcondition|subcommands"} + {-argName "infomethodsubcmd" -type "args|body|definition|handle|parameter|parametersyntax|type|precondition|postcondition|submethods"} {-argName "name" -type tclobj} } classInfoMethod methods NsfClassInfoMethodsMethod { Index: generic/nsf.c =================================================================== diff -u -rbc9096dbfe6718828baf2359730f098d66598065 -r38f8651fe4c101ee7ad98aa46bcadc32459bfdc7 --- generic/nsf.c (.../nsf.c) (revision bc9096dbfe6718828baf2359730f098d66598065) +++ generic/nsf.c (.../nsf.c) (revision 38f8651fe4c101ee7ad98aa46bcadc32459bfdc7) @@ -10880,7 +10880,7 @@ if (procs) Tcl_SetObjResult(interp, AssertionList(interp, procs->post)); return TCL_OK; } - case InfomethodsubcmdSubcommandsIdx: + case InfomethodsubcmdSubmethodsIdx: { if (procPtr == NsfObjDispatch) { NsfObject *subObject = NsfGetObjectFromCmdPtr(cmd); Index: generic/tclAPI.h =================================================================== diff -u -ra3b0e40438f4c944dac1c34387f4292e012f4bd0 -r38f8651fe4c101ee7ad98aa46bcadc32459bfdc7 --- generic/tclAPI.h (.../tclAPI.h) (revision a3b0e40438f4c944dac1c34387f4292e012f4bd0) +++ generic/tclAPI.h (.../tclAPI.h) (revision 38f8651fe4c101ee7ad98aa46bcadc32459bfdc7) @@ -2,13 +2,13 @@ static int ConvertToInfomethodsubcmd(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { int index, result; - static CONST char *opts[] = {"args", "body", "definition", "handle", "parameter", "parametersyntax", "type", "precondition", "postcondition", "subcommands", NULL}; + static CONST char *opts[] = {"args", "body", "definition", "handle", "parameter", "parametersyntax", "type", "precondition", "postcondition", "submethods", NULL}; result = Tcl_GetIndexFromObj(interp, objPtr, opts, "infomethodsubcmd", 0, &index); *clientData = (ClientData) INT2PTR(index + 1); *outObjPtr = objPtr; return result; } -enum InfomethodsubcmdIdx {InfomethodsubcmdNULL, InfomethodsubcmdArgsIdx, InfomethodsubcmdBodyIdx, InfomethodsubcmdDefinitionIdx, InfomethodsubcmdHandleIdx, InfomethodsubcmdParameterIdx, InfomethodsubcmdParametersyntaxIdx, InfomethodsubcmdTypeIdx, InfomethodsubcmdPreconditionIdx, InfomethodsubcmdPostconditionIdx, InfomethodsubcmdSubcommandsIdx}; +enum InfomethodsubcmdIdx {InfomethodsubcmdNULL, InfomethodsubcmdArgsIdx, InfomethodsubcmdBodyIdx, InfomethodsubcmdDefinitionIdx, InfomethodsubcmdHandleIdx, InfomethodsubcmdParameterIdx, InfomethodsubcmdParametersyntaxIdx, InfomethodsubcmdTypeIdx, InfomethodsubcmdPreconditionIdx, InfomethodsubcmdPostconditionIdx, InfomethodsubcmdSubmethodsIdx}; static int ConvertToMethodtype(Tcl_Interp *interp, Tcl_Obj *objPtr, NsfParam CONST *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) { Index: tests/info-method.tcl =================================================================== diff -u -ra3b0e40438f4c944dac1c34387f4292e012f4bd0 -r38f8651fe4c101ee7ad98aa46bcadc32459bfdc7 --- tests/info-method.tcl (.../info-method.tcl) (revision a3b0e40438f4c944dac1c34387f4292e012f4bd0) +++ tests/info-method.tcl (.../info-method.tcl) (revision 38f8651fe4c101ee7ad98aa46bcadc32459bfdc7) @@ -214,50 +214,50 @@ :class-object method "foo y" {z:int} {return z} } - # query definition on subcommand + # query definition on submethod ? {o info method definition "foo b"} {::o method {foo b} {x:int y:upper} {return b}} - # query definition on subcommand with handle + # query definition on submethod with handle ? {o info method definition "::o::foo b"} {::o method {foo b} {x:int y:upper} {return b}} - # query definition on subcommand with handle + # query definition on submethod with handle ? {o info method definition "::o::foo b"} {::o method {foo b} {x:int y:upper} {return b}} - # query definition on subcommand with handle called on different object + # query definition on submethod with handle called on different object ? {o2 info method definition "::o::foo b"} {::o method {foo b} {x:int y:upper} {return b}} # query definition on handle of ensemble object called on different object ? {o2 info method definition "::o::foo::b"} {::o::foo method b {x:int y:upper} {return b}} - # query definition on subcommand with handle called on class + # query definition on submethod with handle called on class ? {o2 info method definition "::o::foo b"} {::o method {foo b} {x:int y:upper} {return b}} # query definition on handle of ensemble object called on class ? {o2 info method definition "::o::foo::b"} {::o::foo method b {x:int y:upper} {return b}} - # query definition on subcommand of class + # query definition on submethod of class ? {::nx::Object info method definition "info lookup methods"} \ {::nx::Object alias {info lookup methods} ::nsf::cmd::ObjectInfo::lookupmethods} - # query definition on subcommand of class with handle + # query definition on submethod of class with handle ? {o info method definition "::nsf::classes::nx::Object::info lookup methods"} \ {::nx::Object alias {info lookup methods} ::nsf::cmd::ObjectInfo::lookupmethods} # query definition on handle of ensemble object of class ? {o info method definition "::nx::Object::slot::__info::lookup::methods"} \ {::nx::Object::slot::__info::lookup alias methods ::nsf::cmd::ObjectInfo::lookupmethods} - ? {lsort [o info method subcommands dummy]} "" - ? {lsort [o info method subcommands foo]} "a b" - ? {lsort [o info method subcommands "foo a"]} "" + ? {lsort [o info method submethods dummy]} "" + ? {lsort [o info method submethods foo]} "a b" + ? {lsort [o info method submethods "foo a"]} "" - ? {lsort [C info method subcommands "bar"]} "a b baz" - ? {lsort [C info method subcommands "bar a"]} "" - ? {lsort [C info method subcommands "bar baz"]} "x y" - ? {lsort [C info method subcommands "bar baz y"]} "" + ? {lsort [C info method submethods "bar"]} "a b baz" + ? {lsort [C info method submethods "bar a"]} "" + ? {lsort [C info method submethods "bar baz"]} "x y" + ? {lsort [C info method submethods "bar baz y"]} "" - ? {lsort [C class-object info method subcommands "foo"]} "x y" - ? {lsort [C class-object info method subcommands "foo x"]} "" + ? {lsort [C class-object info method submethods "foo"]} "x y" + ? {lsort [C class-object info method submethods "foo x"]} "" ? {C info method handle "bar"} {::nsf::classes::C::bar} ? {C info method handle "bar a"} {::nsf::classes::C::bar a}