Index: TODO =================================================================== diff -u -rd9344280c05990c0254aa652a08a09da3e5822b1 -ra093703e9836fc152fcbbce96d4f880ace6a6170 --- TODO (.../TODO) (revision d9344280c05990c0254aa652a08a09da3e5822b1) +++ TODO (.../TODO) (revision a093703e9836fc152fcbbce96d4f880ace6a6170) @@ -5215,9 +5215,21 @@ new: -object.configureparameter removed: -class.objectparameter +nsf.c: +- added options to filter output from ::nsf::cmd::info parameter options + (args, syntax, parameter) +- deleted: + - "/obj/ info lookup configure parameters ?pattern?" + - "/obj/ info lookup configure syntax" +- added: + - "/obj/ info lookup parameters /methodName/ ?pattern?" + - "/obj/ info lookup syntax /methodName/ ?pattern?" + This covers as well + - "/obj/ info lookup parameters configure|create|new|... ?pattern?" +- extend regression test + ======================================================================== TODO: -- use "cmd::info" to implement "info lookup parameter configure" etc. - use context-object for error messages of configure/new/create/recreate - remove // comments Index: generic/nsf.c =================================================================== diff -u -r84d881d46b15242127c77e4934e11ad958c383c5 -ra093703e9836fc152fcbbce96d4f880ace6a6170 --- generic/nsf.c (.../nsf.c) (revision 84d881d46b15242127c77e4934e11ad958c383c5) +++ generic/nsf.c (.../nsf.c) (revision a093703e9836fc152fcbbce96d4f880ace6a6170) @@ -322,7 +322,7 @@ NSF_INLINE static void CallStackDoDestroy(Tcl_Interp *interp, NsfObject *object) nonnull(1) nonnull(2); -/* prototypes for parameter and argument management */ +/* prototypes for parameter and argument management */ static int NsfParameterInvalidateClassCacheCmd(Tcl_Interp *interp, NsfClass *cl) nonnull(1) nonnull(2); @@ -363,15 +363,16 @@ nonnull(1) nonnull(2) nonnull(5); typedef Tcl_Obj *(NsfFormatFunction) _ANSI_ARGS_((Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, - NsfObject *contextObject)); + NsfObject *contextObject, CONST char *pattern)); static Tcl_Obj *NsfParamDefsVirtualFormat(Tcl_Interp *interp, Nsf_Param CONST *pPtr, - NsfObject *contextObject, + NsfObject *contextObject, CONST char *pattern, NsfFormatFunction formatFunction) nonnull(1) nonnull(2) nonnull(3) nonnull(4); static int NsfParamDefsAppendVirtual(Tcl_Interp *interp, Tcl_Obj *listObj, Nsf_Param CONST *paramsPtr, NsfObject *contextObject, + CONST char *pattern, NsfFormatFunction formatFunction) nonnull(1) nonnull(2) nonnull(3) nonnull(5); @@ -10887,7 +10888,7 @@ * *---------------------------------------------------------------------- */ -NSF_INLINE static NsfParamDefs * ParamDefsGet(Tcl_Command cmdPtr, int *checkAlwaysFlagPtr) nonnull(1); +NSF_INLINE static NsfParamDefs *ParamDefsGet(Tcl_Command cmdPtr, int *checkAlwaysFlagPtr) nonnull(1); NSF_INLINE static NsfParamDefs * ParamDefsGet(Tcl_Command cmdPtr, int *checkAlwaysFlagPtr) { @@ -10904,6 +10905,64 @@ return NULL; } +/*---------------------------------------------------------------------- + * NsfParamDefsFilter -- + * + * Process a list of ParamDefs and return a subset of it matching the + * provided pattern. If no parameter name matches the pattern, NULL is + * returned. The client is supposed to FREE the returned parameter list + * (entries are shared, a free of the returned pointer is sufficient). + * + * Results: + * Parameter definitions or NULL + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ +static Nsf_Param *NsfParamDefsFilter(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, CONST char *pattern) + nonnull(1) nonnull(2) nonnull(3); + +static Nsf_Param * +NsfParamDefsFilter(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, CONST char *pattern) { + static Nsf_Param *paramList = NULL; + Nsf_Param CONST *pPtr; + int maxParams, nrMatchingParams; + + /* + * If a single parameter or pattern name is given, we construct a filtered + * parameter list on the fly and we return it + */ + + /* + * Count the parameters + */ + for (pPtr = paramsPtr, maxParams = 0; pPtr->name; pPtr++, maxParams++); + + /* + * Allocate the number of potentional matches + */ + paramList = ParamsNew(maxParams); + + for (pPtr = paramsPtr, nrMatchingParams = 0; pPtr->name; pPtr++) { + if (Tcl_StringMatch( ObjStr(pPtr->nameObj), pattern)) { + paramList[nrMatchingParams] = *pPtr; + nrMatchingParams++; + } + } + + if (nrMatchingParams == 0) { + /* + * The named parameter were NOT found, so return NULL + */ + FREE(Nsf_Param*, paramList); + paramList = NULL; + } + + return paramList; +} + /* *---------------------------------------------------------------------- * NsfProcDeleteProc -- @@ -11156,11 +11215,19 @@ * *---------------------------------------------------------------------- */ -static Tcl_Obj *ParamDefsFormat(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, NsfObject *contextObject) +static Tcl_Obj *ParamDefsFormat(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, NsfObject *contextObject, CONST char *pattern) nonnull(1) nonnull(2) returns_nonnull; +static int ParamsDefMatchPattern(Nsf_Param CONST *paramsPtr, CONST char *pattern) { + if (paramsPtr->nameObj != NULL) { + return Tcl_StringMatch(ObjStr(paramsPtr->nameObj), pattern); + } + return Tcl_StringMatch(paramsPtr->name, pattern); +} + + static Tcl_Obj * -ParamDefsFormat(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, NsfObject *contextObject) { +ParamDefsFormat(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, NsfObject *contextObject, CONST char *pattern) { int first, colonWritten; Tcl_Obj *listObj = Tcl_NewListObj(0, NULL), *innerListObj, *nameStringObj; @@ -11173,7 +11240,8 @@ if (paramsPtr->flags & NSF_ARG_NOCONFIG) { continue; } - if (paramsPtr -> paramObj) { + if (paramsPtr->paramObj) { + if (pattern && !ParamsDefMatchPattern(paramsPtr, pattern)) continue; innerListObj = paramsPtr->paramObj; } else { /* @@ -11191,9 +11259,10 @@ first = 1; colonWritten = 0; - if (NsfParamDefsAppendVirtual(interp, listObj, paramsPtr, contextObject, ParamDefsFormat)) { + if (NsfParamDefsAppendVirtual(interp, listObj, paramsPtr, contextObject, pattern, ParamDefsFormat)) { continue; } + if (pattern && !ParamsDefMatchPattern(paramsPtr, pattern)) continue; nameStringObj = Tcl_NewStringObj(paramsPtr->name, -1); @@ -11261,11 +11330,11 @@ * *---------------------------------------------------------------------- */ -static Tcl_Obj *ParamDefsList(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, NsfObject *contextObject) +static Tcl_Obj *ParamDefsList(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, NsfObject *contextObject, CONST char *pattern) nonnull(1) nonnull(2) returns_nonnull; static Tcl_Obj * -ParamDefsList(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, NsfObject *contextObject) { +ParamDefsList(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, NsfObject *contextObject, CONST char *pattern) { Tcl_Obj *listObj = Tcl_NewListObj(0, NULL); assert(interp); @@ -11275,7 +11344,7 @@ for (; likely(paramsPtr->name != NULL); paramsPtr++) { if ((paramsPtr->flags & NSF_ARG_NOCONFIG) != 0) continue; - if (NsfParamDefsAppendVirtual(interp, listObj, paramsPtr, contextObject, ParamDefsList)) continue; + if (NsfParamDefsAppendVirtual(interp, listObj, paramsPtr, contextObject, pattern, ParamDefsList)) continue; Tcl_ListObjAppendElement(interp, listObj, Tcl_NewStringObj(paramsPtr->name, -1)); } @@ -11299,12 +11368,12 @@ * *---------------------------------------------------------------------- */ -static Tcl_Obj * ParamDefsNames(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, NsfObject *contextObject) +static Tcl_Obj * ParamDefsNames(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, NsfObject *contextObject, CONST char *pattern) nonnull(1) nonnull(2) returns_nonnull; static Tcl_Obj * -ParamDefsNames(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, NsfObject *contextObject) { - Tcl_Obj *listObj = Tcl_NewListObj(0, NULL); +ParamDefsNames(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, NsfObject *contextObject, CONST char *pattern) { + Tcl_Obj *listObj = Tcl_NewListObj(0, NULL), *obj; assert(interp); assert(paramsPtr); @@ -11313,11 +11382,12 @@ for (; likely(paramsPtr->name != NULL); paramsPtr++) { if ((paramsPtr->flags & NSF_ARG_NOCONFIG) != 0) continue; - if (NsfParamDefsAppendVirtual(interp, listObj, paramsPtr, contextObject, ParamDefsNames)) continue; + if (NsfParamDefsAppendVirtual(interp, listObj, paramsPtr, contextObject, pattern, ParamDefsNames)) continue; - Tcl_ListObjAppendElement(interp, listObj, - paramsPtr->nameObj ? paramsPtr->nameObj : - Tcl_NewStringObj(paramsPtr->name,-1)); + obj = paramsPtr->nameObj ? paramsPtr->nameObj : Tcl_NewStringObj(paramsPtr->name,-1); + if (pattern && !Tcl_StringMatch(ObjStr(obj), pattern)) continue; + + Tcl_ListObjAppendElement(interp, listObj, obj); } return listObj; @@ -11450,7 +11520,6 @@ } /* - *---------------------------------------------------------------------- * NsfParamDefsVirtualFormat -- * * This function is called, when we know we can resolve a virtual argument @@ -11467,7 +11536,8 @@ */ static Tcl_Obj * -NsfParamDefsVirtualFormat(Tcl_Interp *interp, Nsf_Param CONST *pPtr, NsfObject *contextObject, NsfFormatFunction formatFunction) { +NsfParamDefsVirtualFormat(Tcl_Interp *interp, Nsf_Param CONST *pPtr, NsfObject *contextObject, CONST char *pattern, + NsfFormatFunction formatFunction) { NsfParsedParam parsedParam; int result; @@ -11485,13 +11555,14 @@ NsfLog(interp, NSF_LOG_WARN, "virtual args: provided context is not a class <%s>", ObjectName(contextObject)); result = TCL_ERROR; } + if (result == TCL_OK && parsedParam.paramDefs != NULL) { - return (*formatFunction)(interp, parsedParam.paramDefs->paramsPtr, contextObject); + return (*formatFunction)(interp, parsedParam.paramDefs->paramsPtr, contextObject, pattern); } + return NULL; } - /* *---------------------------------------------------------------------- * NsfParamDefsAppendVirtual -- @@ -11508,16 +11579,18 @@ *---------------------------------------------------------------------- */ static int -NsfParamDefsAppendVirtual(Tcl_Interp *interp, Tcl_Obj *listObj, Nsf_Param CONST *paramsPtr, NsfObject *contextObject, - NsfFormatFunction formatFunction) { +NsfParamDefsAppendVirtual(Tcl_Interp *interp, Tcl_Obj *listObj, + Nsf_Param CONST *paramsPtr, NsfObject *contextObject, + CONST char *pattern, NsfFormatFunction formatFunction) { assert(interp); assert(listObj); assert(paramsPtr); assert(formatFunction); if (paramsPtr->converter == ConvertToNothing && strcmp(paramsPtr->name, "args") == 0) { + if (contextObject != NULL && strncmp(paramsPtr->type, "virtual", 7) == 0) { - Tcl_Obj *formattedObj = NsfParamDefsVirtualFormat(interp, paramsPtr, contextObject, formatFunction); + Tcl_Obj *formattedObj = NsfParamDefsVirtualFormat(interp, paramsPtr, contextObject, pattern, formatFunction); if (formattedObj != NULL) { Tcl_ListObjAppendList(interp, listObj, formattedObj); return 1; @@ -11544,13 +11617,14 @@ *---------------------------------------------------------------------- */ -Tcl_Obj *NsfParamDefsSyntax(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, NsfObject *contextObject) +Tcl_Obj *NsfParamDefsSyntax(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, NsfObject *contextObject, CONST char *pattern) nonnull(1) nonnull(2) returns_nonnull; Tcl_Obj * -NsfParamDefsSyntax(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, NsfObject *contextObject) { +NsfParamDefsSyntax(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, NsfObject *contextObject, CONST char *pattern) { Tcl_Obj *argStringObj = Tcl_NewObj(); Nsf_Param CONST *pPtr; + int needSpace = 0; assert(interp); assert(paramsPtr); @@ -11565,32 +11639,39 @@ */ continue; } + + // TODO: inside test? if (pPtr != paramsPtr) { /* * Don't output non-consuming parameters (i.e. positional, and no args) */ if (*pPtr->name != '-' && pPtr->nrArgs == 0) { continue; } - Tcl_AppendLimitedToObj(argStringObj, " ", 1, INT_MAX, NULL); } + if (pPtr->converter == ConvertToNothing && strcmp(pPtr->name, "args") == 0) { int argsResolved = 0; if (contextObject != NULL && strncmp(pPtr->type, "virtual", 7) == 0) { - Tcl_Obj *formattedObj = NsfParamDefsVirtualFormat(interp, pPtr, contextObject, NsfParamDefsSyntax); + Tcl_Obj *formattedObj = NsfParamDefsVirtualFormat(interp, pPtr, contextObject, pattern, NsfParamDefsSyntax); if (formattedObj != NULL) { argsResolved = 1; + if (needSpace) Tcl_AppendLimitedToObj(argStringObj, " ", 1, INT_MAX, NULL); Tcl_AppendObjToObj(argStringObj, formattedObj); } } if (argsResolved == 0) { + if (pattern && !ParamsDefMatchPattern(pPtr, pattern)) continue; + if (needSpace) Tcl_AppendLimitedToObj(argStringObj, " ", 1, INT_MAX, NULL); Tcl_AppendLimitedToObj(argStringObj, "?/arg .../?", 11, INT_MAX, NULL); } } else if (pPtr->flags & NSF_ARG_REQUIRED) { + if (pattern && !ParamsDefMatchPattern(pPtr, pattern)) continue; + if (needSpace) Tcl_AppendLimitedToObj(argStringObj, " ", 1, INT_MAX, NULL); if ((pPtr->flags & NSF_ARG_IS_ENUMERATION)) { Tcl_AppendLimitedToObj(argStringObj, Nsf_EnumerationTypeGetDomain(pPtr->converter), -1, INT_MAX, NULL); @@ -11599,10 +11680,13 @@ } } else { + if (pattern && !ParamsDefMatchPattern(pPtr, pattern)) continue; + if (needSpace) Tcl_AppendLimitedToObj(argStringObj, " ", 1, INT_MAX, NULL); Tcl_AppendLimitedToObj(argStringObj, "?", 1, INT_MAX, NULL); NsfParamDefsSyntaxOne(argStringObj, pPtr); Tcl_AppendLimitedToObj(argStringObj, "?", 1, INT_MAX, NULL); } + needSpace = 1; } /* caller has to decr */ return argStringObj; @@ -20657,7 +20741,7 @@ } } else if (unlikely(pPtr->flags & NSF_ARG_REQUIRED) && (processFlags & NSF_ARGPARSE_FORCE_REQUIRED)) { - Tcl_Obj *paramDefsObj = NsfParamDefsSyntax(interp, ifd, NULL); // TODO NsfObject *contextObject + Tcl_Obj *paramDefsObj = NsfParamDefsSyntax(interp, ifd, NULL, NULL); // TODO NsfObject *contextObject Tcl_Obj *methodPathObj = NsfMethodNamePath(interp, NULL /* use topmost frame */, MethodName(pcPtr->full_objv[0])); @@ -21313,22 +21397,23 @@ *---------------------------------------------------------------------- */ static Tcl_Obj *ListParamDefs(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, - NsfObject *contextObject, NsfParamsPrintStyle style) + NsfObject *contextObject, CONST char *pattern, NsfParamsPrintStyle style) nonnull(1) nonnull(2) returns_nonnull; static Tcl_Obj * -ListParamDefs(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, NsfObject *contextObject, +ListParamDefs(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, + NsfObject *contextObject, CONST char *pattern, NsfParamsPrintStyle style) { Tcl_Obj *listObj; assert(interp); assert(paramsPtr); switch (style) { - case NSF_PARAMS_PARAMETER: listObj = ParamDefsFormat(interp, paramsPtr, contextObject); break; - case NSF_PARAMS_LIST: listObj = ParamDefsList(interp, paramsPtr, contextObject); break; - case NSF_PARAMS_NAMES: listObj = ParamDefsNames(interp, paramsPtr, contextObject); break; - default: /* NSF_PARAMS_SYNTAX:*/ listObj = NsfParamDefsSyntax(interp, paramsPtr, contextObject); break; + case NSF_PARAMS_PARAMETER: listObj = ParamDefsFormat(interp, paramsPtr, contextObject, pattern); break; + case NSF_PARAMS_LIST: listObj = ParamDefsList(interp, paramsPtr, contextObject, pattern); break; + case NSF_PARAMS_NAMES: listObj = ParamDefsNames(interp, paramsPtr, contextObject, pattern); break; + default: /* NSF_PARAMS_SYNTAX:*/ listObj = NsfParamDefsSyntax(interp, paramsPtr, contextObject, pattern); break; } return listObj; @@ -21353,12 +21438,12 @@ */ static int ListCmdParams(Tcl_Interp *interp, Tcl_Command cmd, NsfObject *contextObject, - CONST char *methodName, NsfParamsPrintStyle printStyle) - nonnull(1) nonnull(2) nonnull(4) ; + CONST char *pattern, CONST char *methodName, NsfParamsPrintStyle printStyle) + nonnull(1) nonnull(2) nonnull(5); static int ListCmdParams(Tcl_Interp *interp, Tcl_Command cmd, NsfObject *contextObject, - CONST char *methodName, NsfParamsPrintStyle printStyle) { + CONST char *pattern, CONST char *methodName, NsfParamsPrintStyle printStyle) { NsfParamDefs *paramDefs; Tcl_Obj *listObj; Proc *procPtr; @@ -21373,7 +21458,7 @@ /* * Obtain parameter info from paramDefs. */ - listObj = ListParamDefs(interp, paramDefs->paramsPtr, contextObject, printStyle); + listObj = ListParamDefs(interp, paramDefs->paramsPtr, contextObject, pattern, printStyle); Tcl_SetObjResult(interp, listObj); DECR_REF_COUNT2("paramDefsObj", listObj); return TCL_OK; @@ -21392,6 +21477,7 @@ if (!TclIsCompiledLocalArgument(args)) { continue; } + if (pattern && !Tcl_StringMatch(args->name, pattern)) continue; if (printStyle == NSF_PARAMS_SYNTAX && strcmp(args->name, "args") == 0) { if (args != procPtr->firstLocalPtr) { @@ -21442,7 +21528,7 @@ Nsf_methodDefinition *mdPtr = Nsf_CmdDefinitionGet(((Command *)cmd)->objProc); if (mdPtr != NULL) { NsfParamDefs paramDefs = {mdPtr->paramDefs, mdPtr->nrParameters, 1, 0, NULL, NULL}; - Tcl_Obj *list = ListParamDefs(interp, paramDefs.paramsPtr, contextObject, printStyle); + Tcl_Obj *list = ListParamDefs(interp, paramDefs.paramsPtr, contextObject, pattern, printStyle); Tcl_SetObjResult(interp, list); DECR_REF_COUNT2("paramDefsObj", list); @@ -21459,7 +21545,7 @@ paramDefs.paramsPtr = cd->paramsPtr; paramDefs.nrParams = 1; paramDefs.slotObj = NULL; - list = ListParamDefs(interp, paramDefs.paramsPtr, contextObject, printStyle); + list = ListParamDefs(interp, paramDefs.paramsPtr, contextObject, pattern, printStyle); Tcl_SetObjResult(interp, list); DECR_REF_COUNT2("paramDefsObj", list); return TCL_OK; @@ -21686,6 +21772,7 @@ Tcl_Command cmd, int subcmd, NsfObject *contextObject, + CONST char *pattern, int withPer_object) nonnull(1) nonnull(4) nonnull(5); @@ -21697,6 +21784,7 @@ Tcl_Command cmd, int subcmd, NsfObject *contextObject, + CONST char *pattern, int withPer_object) { Tcl_ObjCmdProc *procPtr; @@ -21745,12 +21833,12 @@ case InfomethodsubcmdArgsIdx: { Tcl_Command importedCmd = GetOriginalCommand(cmd); - return ListCmdParams(interp, importedCmd, contextObject, methodName, NSF_PARAMS_NAMES); + return ListCmdParams(interp, importedCmd, contextObject, pattern, methodName, NSF_PARAMS_NAMES); } case InfomethodsubcmdParameterIdx: { Tcl_Command importedCmd = GetOriginalCommand(cmd); - return ListCmdParams(interp, importedCmd, contextObject, methodName, NSF_PARAMS_PARAMETER); + return ListCmdParams(interp, importedCmd, contextObject, pattern, methodName, NSF_PARAMS_PARAMETER); } case InfomethodsubcmdReturnsIdx: { @@ -21767,7 +21855,7 @@ case InfomethodsubcmdSyntaxIdx: { Tcl_Command importedCmd = GetOriginalCommand(cmd); - return ListCmdParams(interp, importedCmd, contextObject, methodName, NSF_PARAMS_SYNTAX); + return ListCmdParams(interp, importedCmd, contextObject, pattern, methodName, NSF_PARAMS_SYNTAX); } case InfomethodsubcmdPreconditionIdx: { @@ -21861,7 +21949,7 @@ Tcl_ListObjAppendElement(interp, resultObj, Tcl_NewStringObj("::proc", -1)); Tcl_ListObjAppendElement(interp, resultObj, Tcl_NewStringObj(methodName,-1)); } - ListCmdParams(interp, cmd, contextObject, methodName, NSF_PARAMS_PARAMETER); + ListCmdParams(interp, cmd, contextObject, NULL, methodName, NSF_PARAMS_PARAMETER); Tcl_ListObjAppendElement(interp, resultObj, Tcl_GetObjResult(interp)); AppendReturnsClause(interp, resultObj, cmd); @@ -21973,7 +22061,7 @@ Tcl_ListObjAppendElement(interp, resultObj, Tcl_NewStringObj(Tcl_DStringValue(dsPtr), Tcl_DStringLength(dsPtr))); - ListCmdParams(interp, cmd, NULL, Tcl_DStringValue(dsPtr), NSF_PARAMS_PARAMETER); + ListCmdParams(interp, cmd, NULL, NULL, Tcl_DStringValue(dsPtr), NSF_PARAMS_PARAMETER); Tcl_ListObjAppendElement(interp, resultObj, Tcl_GetObjResult(interp)); ListProcBody(interp, GetTclProcFromCommand(procCmd), methodName); Tcl_ListObjAppendElement(interp, resultObj, Tcl_GetObjResult(interp)); @@ -22105,13 +22193,15 @@ *---------------------------------------------------------------------- */ static int -ListMethodResolve(Tcl_Interp *interp, int subcmd, NsfObject *contextObject, +ListMethodResolve(Tcl_Interp *interp, int subcmd, + NsfObject *contextObject, CONST char *pattern, Tcl_Namespace *nsPtr, NsfObject *object, Tcl_Obj *methodNameObj, int fromClassNS) - nonnull(1) nonnull(6); + nonnull(1) nonnull(7); static int -ListMethodResolve(Tcl_Interp *interp, int subcmd, NsfObject *contextObject, +ListMethodResolve(Tcl_Interp *interp, int subcmd, + NsfObject *contextObject, CONST char *pattern, Tcl_Namespace *nsPtr, NsfObject *object, Tcl_Obj *methodNameObj, int fromClassNS) { NsfObject *regObject, *defObject; @@ -22136,7 +22226,8 @@ result = ListMethod(interp, regObject ? regObject : object, defObject ? defObject : object, - methodName1, cmd, subcmd, contextObject, + methodName1, cmd, subcmd, + contextObject, pattern, fromClassNS ? 0 : 1); } else if (subcmd == InfomethodsubcmdExistsIdx) { @@ -23454,15 +23545,16 @@ {-argName "subcmd" -required 1 -typeName "methodgetcmd" -type "args|body|definition|exists|registrationhandle|definitionhandle|origin|parameter|syntax|type|precondition|postcondition|submethods|returns"} {-argName "-context" -required 0 -type object} {-argName "methodName" -required 1 -type tclobj} + {-argName "pattern" -required 0} } {-nxdoc 1} */ static int -NsfCmdInfoCmd(Tcl_Interp *interp, int subcmd, NsfObject *context, Tcl_Obj *methodNameObj) { +NsfCmdInfoCmd(Tcl_Interp *interp, int subcmd, NsfObject *context, Tcl_Obj *methodNameObj, CONST char *pattern) { assert(interp); assert(methodNameObj); - return ListMethodResolve(interp, subcmd, context, NULL, NULL, methodNameObj, 0); + return ListMethodResolve(interp, subcmd, context, pattern, NULL, NULL, methodNameObj, 0); } /* @@ -25233,19 +25325,19 @@ break; case ParametersubcmdListIdx: - listObj = ParamDefsList(interp, paramsPtr, NULL); // TODO contextObject + listObj = ParamDefsList(interp, paramsPtr, NULL, NULL); // TODO contextObject Tcl_SetObjResult(interp, listObj); DECR_REF_COUNT2("paramDefsObj", listObj); break; case ParametersubcmdNameIdx: - listObj = ParamDefsNames(interp, paramsPtr, NULL); // TODO contextObject + listObj = ParamDefsNames(interp, paramsPtr, NULL, NULL); // TODO contextObject Tcl_SetObjResult(interp, listObj); DECR_REF_COUNT2("paramDefsObj", listObj); break; case ParametersubcmdSyntaxIdx: - listObj = NsfParamDefsSyntax(interp, paramsPtr, NULL); // TODO contextObject + listObj = NsfParamDefsSyntax(interp, paramsPtr, NULL, NULL); // TODO contextObject Tcl_SetObjResult(interp, listObj); DECR_REF_COUNT2("paramDefsObj", listObj); break; @@ -26835,7 +26927,7 @@ Tcl_Obj *varObj = Tcl_ObjGetVar2(interp, paramPtr->nameObj, NULL, TCL_PARSE_PART1); if (varObj == NULL) { - Tcl_Obj *paramDefsObj = NsfParamDefsSyntax(interp, paramDefs->paramsPtr, object); // TODO contextObject? + Tcl_Obj *paramDefsObj = NsfParamDefsSyntax(interp, paramDefs->paramsPtr, object, NULL); // TODO contextObject? NsfPrintError(interp, "required argument '%s' is missing, should be:\n\t%s%s%s %s", paramPtr->nameObj ? ObjStr(paramPtr->nameObj) : paramPtr->name, @@ -28001,7 +28093,7 @@ Tcl_Obj *listObj; listObj = ListParamDefs(interp, class->parsedParamPtr->paramDefs->paramsPtr, - NULL, NSF_PARAMS_PARAMETER); + NULL, NULL, NSF_PARAMS_PARAMETER); Tcl_SetObjResult(interp, listObj); DECR_REF_COUNT2("paramDefsObj", listObj); } @@ -28517,8 +28609,8 @@ int perObject = (pcl == NULL); ListMethod(interp, pobj, pobj, ObjStr(methodObj), cmd, - InfomethodsubcmdRegistrationhandleIdx, NULL, - perObject); + InfomethodsubcmdRegistrationhandleIdx, + NULL, NULL, perObject); } return TCL_OK; } @@ -28735,7 +28827,7 @@ static int NsfObjInfoMethodMethod(Tcl_Interp *interp, NsfObject *object, int subcmd, Tcl_Obj *methodNameObj) { - return ListMethodResolve(interp, subcmd, NULL, object->nsPtr, object, methodNameObj, 0); + return ListMethodResolve(interp, subcmd, NULL, NULL, object->nsPtr, object, methodNameObj, 0); } /* @@ -28813,6 +28905,7 @@ {-argName "pattern" -required 0} } */ + static int NsfObjInfoObjectparameterMethod(Tcl_Interp *interp, NsfObject *object, int subcmd, CONST char *pattern) { NsfParsedParam parsedParam; @@ -28833,54 +28926,31 @@ paramsPtr = parsedParam.paramDefs->paramsPtr; - /* - * If a single parameter name is given, we construct a filtered parameter - * list on the fly and provide it to the output functions. - */ if (pattern) { - Nsf_Param CONST *pPtr; - int maxParams, nrMatchingParams; - - /* - * Count the parameters - */ - for (pPtr = paramsPtr, maxParams = 0; pPtr->name; pPtr++, maxParams++); - /* - * Allocate the number of potentional matches - */ - paramList = ParamsNew(maxParams); - - for (pPtr = paramsPtr, nrMatchingParams = 0; pPtr->name; pPtr++) { - if (Tcl_StringMatch( ObjStr(pPtr->nameObj), pattern)) { - paramList[nrMatchingParams] = *pPtr; - nrMatchingParams++; - } - } - - if (nrMatchingParams == 0) { + paramList = NsfParamDefsFilter(interp, paramsPtr, pattern); + if (unlikely(paramList == NULL)) { /* * The named parameter were NOT found, so return "". */ Tcl_SetObjResult(interp, NsfGlobalObjs[NSF_EMPTY]); - FREE(Nsf_Param*, paramList); return TCL_OK; } - /* iterate over the computed selection */ + /* Iterate below over the computed selection */ paramsPtr = paramList; } switch (subcmd) { case InfoobjectparametersubcmdDefinitionsIdx: - listObj = ParamDefsFormat(interp, paramsPtr, NULL); // TODO contextObject + listObj = ParamDefsFormat(interp, paramsPtr, NULL, NULL); // TODO contextObject break; case InfoobjectparametersubcmdListIdx: - listObj = ParamDefsList(interp, paramsPtr, NULL); // TODO contextObject + listObj = ParamDefsList(interp, paramsPtr, NULL, NULL); // TODO contextObject break; case InfoobjectparametersubcmdNamesIdx: - listObj = ParamDefsNames(interp, paramsPtr, NULL); // TODO contextObject + listObj = ParamDefsNames(interp, paramsPtr, NULL, NULL); // TODO contextObject break; case InfoobjectparametersubcmdSyntaxIdx: - listObj = NsfParamDefsSyntax(interp, paramsPtr, NULL); // TODO contextObject + listObj = NsfParamDefsSyntax(interp, paramsPtr, NULL, NULL); // TODO contextObject break; } assert(listObj); @@ -29174,7 +29244,7 @@ NsfClassInfoMethodMethod(Tcl_Interp *interp, NsfClass *class, int subcmd, Tcl_Obj *methodNameObj) { - return ListMethodResolve(interp, subcmd, NULL, class->nsPtr, &class->object, methodNameObj, 1); + return ListMethodResolve(interp, subcmd, NULL, NULL, class->nsPtr, &class->object, methodNameObj, 1); } /* Index: generic/nsfAPI.decls =================================================================== diff -u -rd9344280c05990c0254aa652a08a09da3e5822b1 -ra093703e9836fc152fcbbce96d4f880ace6a6170 --- generic/nsfAPI.decls (.../nsfAPI.decls) (revision d9344280c05990c0254aa652a08a09da3e5822b1) +++ generic/nsfAPI.decls (.../nsfAPI.decls) (revision a093703e9836fc152fcbbce96d4f880ace6a6170) @@ -102,6 +102,7 @@ {-argName "subcmd" -required 1 -typeName "methodgetcmd" -type "args|body|definition|exists|registrationhandle|definitionhandle|origin|parameter|syntax|type|precondition|postcondition|submethods|returns"} {-argName "-context" -required 0 -type object} {-argName "methodName" -required 1 -type tclobj} + {-argName "pattern" -required 0} } {-nxdoc 1} # Index: generic/nsfAPI.h =================================================================== diff -u -rd9344280c05990c0254aa652a08a09da3e5822b1 -ra093703e9836fc152fcbbce96d4f880ace6a6170 --- generic/nsfAPI.h (.../nsfAPI.h) (revision d9344280c05990c0254aa652a08a09da3e5822b1) +++ generic/nsfAPI.h (.../nsfAPI.h) (revision a093703e9836fc152fcbbce96d4f880ace6a6170) @@ -558,7 +558,7 @@ NSF_nonnull(1) NSF_nonnull(2) NSF_nonnull(7) NSF_nonnull(8) NSF_nonnull(9); static int NsfAsmProcCmd(Tcl_Interp *interp, int withAd, int withCheckalways, Tcl_Obj *procName, Tcl_Obj *arguments, Tcl_Obj *body) NSF_nonnull(1) NSF_nonnull(4) NSF_nonnull(5) NSF_nonnull(6); -static int NsfCmdInfoCmd(Tcl_Interp *interp, int subcmd, NsfObject *withContext, Tcl_Obj *methodName) +static int NsfCmdInfoCmd(Tcl_Interp *interp, int subcmd, NsfObject *withContext, Tcl_Obj *methodName, CONST char *pattern) NSF_nonnull(1) NSF_nonnull(4); static int NsfColonCmd(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) NSF_nonnull(1); @@ -1455,9 +1455,10 @@ int subcmd = (int )PTR2INT(pc.clientData[0]); NsfObject *withContext = (NsfObject *)pc.clientData[1]; Tcl_Obj *methodName = (Tcl_Obj *)pc.clientData[2]; + CONST char *pattern = (CONST char *)pc.clientData[3]; assert(pc.status == 0); - return NsfCmdInfoCmd(interp, subcmd, withContext, methodName); + return NsfCmdInfoCmd(interp, subcmd, withContext, methodName, pattern); } else { return TCL_ERROR; @@ -3309,10 +3310,11 @@ {"arguments", NSF_ARG_REQUIRED, 1, Nsf_ConvertTo_Tclobj, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}, {"body", NSF_ARG_REQUIRED, 1, Nsf_ConvertTo_Tclobj, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}} }, -{"::nsf::cmd::info", NsfCmdInfoCmdStub, 3, { +{"::nsf::cmd::info", NsfCmdInfoCmdStub, 4, { {"subcmd", NSF_ARG_REQUIRED|NSF_ARG_IS_ENUMERATION, 1, ConvertToInfomethodsubcmd, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}, {"-context", 0, 1, Nsf_ConvertTo_Object, NULL,NULL,"object",NULL,NULL,NULL,NULL,NULL}, - {"methodName", NSF_ARG_REQUIRED, 1, Nsf_ConvertTo_Tclobj, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}} + {"methodName", NSF_ARG_REQUIRED, 1, Nsf_ConvertTo_Tclobj, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}, + {"pattern", 0, 1, Nsf_ConvertTo_String, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}} }, {"::nsf::colon", NsfColonCmdStub, 1, { {"args", 0, 1, ConvertToNothing, NULL,NULL,"allargs",NULL,NULL,NULL,NULL,NULL}} Index: generic/nsfError.c =================================================================== diff -u -rd9344280c05990c0254aa652a08a09da3e5822b1 -ra093703e9836fc152fcbbce96d4f880ace6a6170 --- generic/nsfError.c (.../nsfError.c) (revision d9344280c05990c0254aa652a08a09da3e5822b1) +++ generic/nsfError.c (.../nsfError.c) (revision a093703e9836fc152fcbbce96d4f880ace6a6170) @@ -29,7 +29,8 @@ #include "nsfInt.h" /* function prototypes */ -Tcl_Obj *NsfParamDefsSyntax(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, NsfObject *contextObject) +Tcl_Obj *NsfParamDefsSyntax(Tcl_Interp *interp, Nsf_Param CONST *paramsPtr, + NsfObject *contextObject, CONST char *pattern) nonnull(1) nonnull(2) returns_nonnull; /* @@ -288,7 +289,7 @@ int NsfArgumentError(Tcl_Interp *interp, CONST char *errorMsg, Nsf_Param CONST *paramPtr, Tcl_Obj *cmdNameObj, Tcl_Obj *methodObj) { - Tcl_Obj *argStringObj = NsfParamDefsSyntax(interp, paramPtr, NULL); + Tcl_Obj *argStringObj = NsfParamDefsSyntax(interp, paramPtr, NULL, NULL); assert(interp); assert(errorMsg); Index: library/nx/nx.tcl =================================================================== diff -u -rd9344280c05990c0254aa652a08a09da3e5822b1 -ra093703e9836fc152fcbbce96d4f880ace6a6170 --- library/nx/nx.tcl (.../nx.tcl) (revision d9344280c05990c0254aa652a08a09da3e5822b1) +++ library/nx/nx.tcl (.../nx.tcl) (revision a093703e9836fc152fcbbce96d4f880ace6a6170) @@ -715,14 +715,19 @@ if {[info exists pattern]} {lappend cmd $pattern} return [: {*}$cmd] } - :method "info lookup configure parameters" {pattern:optional} { - set cmd [list ::nsf::methods::object::info::objectparameter definitions] - if {[info exists pattern]} {lappend cmd $pattern} - return [: {*}$cmd] + :method "info lookup parameters" {methodName pattern:optional} { + return [::nsf::cmd::info \ + parameter \ + -context [self] \ + [:info lookup method $methodName] \ + {*}[expr {[info exists pattern] ? $pattern : ""}] ] } - :method "info lookup configure syntax" {} { - set syntax [: ::nsf::methods::object::info::objectparameter syntax] - return [string trimright $syntax " "] + :method "info lookup syntax" {methodName pattern:optional} { + return [::nsf::cmd::info \ + syntax \ + -context [self] \ + [:info lookup method $methodName] \ + {*}[expr {[info exists pattern] ? $pattern : ""}] ] } :method "info lookup variables" {pattern:optional} { return [: info lookup slots -type ::nx::VariableSlot {*}[current args]] Index: tests/cget.test =================================================================== diff -u -r23b10a2c736cf33731b0d7b0381314ddec44f2d6 -ra093703e9836fc152fcbbce96d4f880ace6a6170 --- tests/cget.test (.../cget.test) (revision 23b10a2c736cf33731b0d7b0381314ddec44f2d6) +++ tests/cget.test (.../cget.test) (revision a093703e9836fc152fcbbce96d4f880ace6a6170) @@ -55,7 +55,7 @@ # ? {p1 configure} "" - ? {p1 info lookup configure syntax} {?-sex /value/? -famnam /value/ ?-age /integer/? ?-friends /value .../? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {p1 info lookup syntax configure} {?-sex /value/? -famnam /value/ ?-age /integer/? ?-friends /value .../? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} } # @@ -97,7 +97,7 @@ # ? {p1 configure} "" - ? {p1 info lookup configure syntax} {?-bar1 /value/? ?-bar2 /value/? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {p1 info lookup syntax configure} {?-bar1 /value/? ?-bar2 /value/? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} # @@ -141,7 +141,7 @@ # # class-level lookup # - ? {C info lookup configure syntax} \ + ? {C info lookup syntax configure} \ "?-superclass /class .../? ?-mixin /mixinreg .../? ?-filter /filterreg .../? ?-volatile? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?" ? {C cget -superclass} "::nx::Object" ? {C cget -object-mixin} "" @@ -154,7 +154,7 @@ # # object-level lookup # - ? {c1 info lookup configure syntax} \ + ? {c1 info lookup syntax configure} \ "?-foo /value/? ?-bar /value/? ?-volatile? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?" # Index: tests/info-method.test =================================================================== diff -u -r4ca122f3c023fe74de3b36c8a65c3145e554aeba -ra093703e9836fc152fcbbce96d4f880ace6a6170 --- tests/info-method.test (.../info-method.test) (revision 4ca122f3c023fe74de3b36c8a65c3145e554aeba) +++ tests/info-method.test (.../info-method.test) (revision a093703e9836fc152fcbbce96d4f880ace6a6170) @@ -747,9 +747,9 @@ ? {::nx::Object info methods "info"} "info" ? {::nx::Object info methods -path "info"} "" ? {lsort [::nx::Object info methods -path "info lookup *"]} \ - "{info lookup configure parameters} {info lookup configure syntax} {info lookup filter} {info lookup filters} {info lookup method} {info lookup methods} {info lookup mixins} {info lookup slots} {info lookup variables}" + "{info lookup filter} {info lookup filters} {info lookup method} {info lookup methods} {info lookup mixins} {info lookup parameters} {info lookup slots} {info lookup syntax} {info lookup variables}" ? {lsort [::nx::Object info methods -path "info *parameter*"]} \ - "{info lookup configure parameters} {info object method parameters} {info variable parameter}" + "{info lookup parameters} {info object method parameters} {info variable parameter}" ? {lsort [::nx::Object info methods "slots"]} "" ? {lsort [::nx::Object info methods "*slots*"]} "" ? {lsort [::nx::Object info methods -path "*slot*"]} \ Index: tests/parameters.test =================================================================== diff -u -rd9344280c05990c0254aa652a08a09da3e5822b1 -ra093703e9836fc152fcbbce96d4f880ace6a6170 --- tests/parameters.test (.../parameters.test) (revision d9344280c05990c0254aa652a08a09da3e5822b1) +++ tests/parameters.test (.../parameters.test) (revision a093703e9836fc152fcbbce96d4f880ace6a6170) @@ -1739,7 +1739,7 @@ ? {d1 configure} "" D property x:required - ? {d1 info lookup configure syntax} \ + ? {d1 info lookup syntax configure} \ "-x /value/ ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?" ? {d1 configure} \ @@ -1967,45 +1967,45 @@ # ? {c1 info object mixin classes} ::M1 ? {c1 cget -object-mixin} ::M1 - ? {c1 info lookup configure parameters b*} "-b1:required" + ? {c1 info lookup parameters configure b*} "-b1:required" # # add one more mixin. # c1 object mixin add ::M2 ? {c1 info object mixin classes} {::M2 ::M1} ? {c1 cget -object-mixin} {::M2 ::M1} - ? {c1 info lookup configure parameters b1} "-b1:required" - ? {c1 info lookup configure parameters b2} "-b2:required" - ? {lsort [c1 info lookup configure parameters b*]} "-b1:required -b2:required" + ? {c1 info lookup parameters configure b1} "-b1:required" + ? {c1 info lookup parameters configure b2} "-b2:required" + ? {lsort [c1 info lookup parameters configure b*]} "-b1:required -b2:required" # # drop the mixins, the b* properties should be gone. # c1 object mixin set "" ? {c1 info object mixin classes} {} - ? {lsort [c1 info lookup configure parameters b*]} "" + ? {lsort [c1 info lookup parameters configure b*]} "" # # add M1 again # c1 object mixin add ::M1 ? {c1 info object mixin classes} {::M1} - ? {c1 info lookup configure parameters b1} "-b1:required" - ? {lsort [c1 info lookup configure parameters b*]} "-b1:required" + ? {c1 info lookup parameters configure b1} "-b1:required" + ? {lsort [c1 info lookup parameters configure b*]} "-b1:required" # # We have the per-object cache; adding a per-object property should # flush the cache # c1 object property bo1 - ? {lsort [c1 info lookup configure parameters b*]} "-b1:required -bo1" + ? {lsort [c1 info lookup parameters configure b*]} "-b1:required -bo1" c1 object property bo2 - ? {lsort [c1 info lookup configure parameters b*]} "-b1:required -bo1 -bo2" + ? {lsort [c1 info lookup parameters configure b*]} "-b1:required -bo1 -bo2" # # property deletion should invalidate the cache as well # c1 delete object property bo2 - ? {lsort [c1 info lookup configure parameters b*]} "-b1:required -bo1" + ? {lsort [c1 info lookup parameters configure b*]} "-b1:required -bo1" } Index: tests/properties.test =================================================================== diff -u -rd9344280c05990c0254aa652a08a09da3e5822b1 -ra093703e9836fc152fcbbce96d4f880ace6a6170 --- tests/properties.test (.../properties.test) (revision d9344280c05990c0254aa652a08a09da3e5822b1) +++ tests/properties.test (.../properties.test) (revision a093703e9836fc152fcbbce96d4f880ace6a6170) @@ -41,7 +41,7 @@ # # just the public properties are accessible via the configure interface # - ? {c1 info lookup configure syntax} { ?-e /value/? ?-a /value/? ?-b /value/? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {c1 info lookup syntax configure} {?-e /value/? ?-a /value/? ?-b /value/? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} ? {lsort [C info slots]} "::C::slot::____C.d ::C::slot::____C.vd ::C::slot::a ::C::slot::b ::C::slot::c ::C::slot::e ::C::slot::va ::C::slot::vb ::C::slot::vc ::C::slot::ve ::C::slot::vf" @@ -235,7 +235,7 @@ # # The use of "-incremental" implies multivalued # - ? {c1 info lookup configure syntax} { ?-e /value .../? ?-a /value .../? ?-b /value .../? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {c1 info lookup syntax configure} {?-e /value .../? ?-a /value .../? ?-b /value .../? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} ? {c1 cget -a} a1 ? {c1 cget -b} b1 @@ -410,7 +410,7 @@ # just the public properties are accessible via the configure interface # - ? {o1 info lookup configure syntax} { ?-e /value/? ?-a /value/? ?-b /value/? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {o1 info lookup syntax configure} {?-e /value/? ?-a /value/? ?-b /value/? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} # # just the public properties are accessible via the cget interface @@ -538,7 +538,7 @@ # # The use of "-incremental" implies multivalued # - ? {o1 info lookup configure syntax} { ?-e /value .../? ?-a /value .../? ?-b /value .../? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {o1 info lookup syntax configure} {?-e /value .../? ?-a /value .../? ?-b /value .../? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} ? {o1 cget -a} a1 ? {o1 cget -b} b1 @@ -759,12 +759,12 @@ # just the public properties are accessible via the configure interface # - ? {c1 info lookup configure syntax} {?-a /value/? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {c1 info lookup syntax configure} {?-a /value/? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} ? {c1 cget -a} a1 ? {c1 configure -a a2} "" - ? {C info lookup configure syntax} {?-b /value/? ?-superclass /class .../? ?-mixin /mixinreg .../? ?-filter /filterreg .../? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {C info lookup syntax configure} {?-b /value/? ?-superclass /class .../? ?-mixin /mixinreg .../? ?-filter /filterreg .../? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} ? {C cget -b} b1 ? {C configure -b b2} "" @@ -819,7 +819,7 @@ # package require nx::volatile - ? {c1 info lookup configure syntax} { ?-e /value/? ?-a /value/? ?-b /value/? ?-volatile? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {c1 info lookup syntax configure} {?-e /value/? ?-a /value/? ?-b /value/? ?-volatile? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} set e [C eval :__object_configureparameter] ? {C eval :__object_configureparameter} $e @@ -838,7 +838,7 @@ # # check influence of class-level per-object properties # - ? {d1 info lookup configure syntax} { ?-e /value/? ?-a /value/? ?-b /value/? ?-volatile? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {d1 info lookup syntax configure} {?-e /value/? ?-a /value/? ?-b /value/? ?-volatile? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} set e [D eval :__object_configureparameter] ? {D eval :__object_configureparameter} $e @@ -878,7 +878,7 @@ # just the public properties are accessible via the configure interface # - ? {o1 info lookup configure syntax} { ?-e /value/? ?-a /value/? ?-b /value/? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {o1 info lookup syntax configure} {?-e /value/? ?-a /value/? ?-b /value/? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} set e [o1 eval :__object_configureparameter]