Index: TODO =================================================================== diff -u -r2f793442bb2a7860acc5620811dcafddc43074d3 -rdf69a2729a1b835c38c170cb7439240089b86c6e --- TODO (.../TODO) (revision 2f793442bb2a7860acc5620811dcafddc43074d3) +++ TODO (.../TODO) (revision df69a2729a1b835c38c170cb7439240089b86c6e) @@ -5240,54 +5240,8 @@ /cls/ info syntax Use e.g. "/cls/ info lookup parameters create" instead -nsf.c: -- Let "/cls/ info mixinof -closure" return as well implicit mixin classes - to make it easier to determine class dependencies. - - Example: - - nx::Class create M0 - nx::Class create M1 -superclass M0 - nx::Class create M2 -superclass M1 - - nx::Class create C - nx::Class create D -superclass C - - C mixin add M2 - - # M2 is mixed into C, and implicitely into D - # - # Since M2 is a subclass of M1, classes C and D depend as well - # on M1 and M0, as seen in the heritage: - - ? {C info heritage} ":M2 ::M1 ::M0 ::nx::Object" - ? {D info heritage} ":M2 ::M1 ::M0 ::C ::nx::Object" - - # previously, only "M2 info mixinof -closure" showed the - # mixin relations, even with "-closure", while M1 and M0 did not. - - ? {M2 info mixinof -closure} "::C ::D" - - # now these show the same relations (in this example). - - ? {M1 info mixinof -closure} "::C ::D" - ? {M0 info mixinof -closure} "::C ::D" - -- adapt mixinof.test to the additional information -- transform mixinof.test to newer style regression test with autoated object deletion - -======================================================================== -TODO: -- update migration guide/tutorial - -- should we change "/obj/ info lookup syntax" to return obj and method as well? - -- use context-object for error messages of configure/new/create/recreate -- remove // comments - -- what should happen with: "/class/ info mixin classes -heritage" -- asymmetry between "/obj/ info lookup mixins" vs. "/obj/ info ?object? mixin classes" - +moved block here for keeping arguments +===== - configure parameters: we have to cleanup Given: @@ -5337,6 +5291,57 @@ which is somewhat strange, since configure is not an object method. Probably: nsf-level command for handles. +==== + +nsf.c: +- Let "/cls/ info mixinof -closure" return as well implicit mixin classes + to make it easier to determine class dependencies. + + Example: + + nx::Class create M0 + nx::Class create M1 -superclass M0 + nx::Class create M2 -superclass M1 + + nx::Class create C + nx::Class create D -superclass C + + C mixin add M2 + + # M2 is mixed into C, and implicitely into D + # + # Since M2 is a subclass of M1, classes C and D depend as well + # on M1 and M0, as seen in the heritage: + + ? {C info heritage} ":M2 ::M1 ::M0 ::nx::Object" + ? {D info heritage} ":M2 ::M1 ::M0 ::C ::nx::Object" + + # previously, only "M2 info mixinof -closure" showed the + # mixin relations, even with "-closure", while M1 and M0 did not. + + ? {M2 info mixinof -closure} "::C ::D" + + # now these show the same relations (in this example). + + ? {M1 info mixinof -closure} "::C ::D" + ? {M0 info mixinof -closure} "::C ::D" + +- adapt mixinof.test to the additional information +- transform mixinof.test to newer style regression test with automated object deletion + +======================================================================== +TODO: +- update migration guide/tutorial + +- should we change "/obj/ info lookup syntax /methodName/" to return obj and method as well? + (similar to "info method syntax /methodName/") +- we could drop methods::object::info::objectparameter + +- remove // comments + +- what should happen with: "/class/ info mixin classes -heritage" +- asymmetry between "/obj/ info lookup mixins" vs. "/obj/ info ?object? mixin classes" + - fix error message for "C object mixin" returns "::C mixin add|clear|delete|get|guard|set" and not Index: generic/nsf.c =================================================================== diff -u -r499076135dfc9324b3e92bf0aa072026be56b832 -rdf69a2729a1b835c38c170cb7439240089b86c6e --- generic/nsf.c (.../nsf.c) (revision 499076135dfc9324b3e92bf0aa072026be56b832) +++ generic/nsf.c (.../nsf.c) (revision df69a2729a1b835c38c170cb7439240089b86c6e) @@ -25369,6 +25369,13 @@ paramsPtr = parsedParam.paramDefs->paramsPtr; assert(paramsPtr); + /* + * Since we are passing in a parameter definition in Tcl syntax, and we want + * to extract information from that syntax, it make limited sense to provide + * a context object for virutal parameter expansion. At least, we do not + * allow this so far. + */ + switch (parametersubcmd) { case ParametersubcmdDefaultIdx: if (paramsPtr->defaultValue) { @@ -25388,19 +25395,19 @@ break; case ParametersubcmdListIdx: - listObj = ParamDefsList(interp, paramsPtr, NULL, NULL); // TODO contextObject + listObj = ParamDefsList(interp, paramsPtr, NULL, NULL); Tcl_SetObjResult(interp, listObj); DECR_REF_COUNT2("paramDefsObj", listObj); break; case ParametersubcmdNameIdx: - listObj = ParamDefsNames(interp, paramsPtr, NULL, NULL); // TODO contextObject + listObj = ParamDefsNames(interp, paramsPtr, NULL, NULL); Tcl_SetObjResult(interp, listObj); DECR_REF_COUNT2("paramDefsObj", listObj); break; case ParametersubcmdSyntaxIdx: - listObj = NsfParamDefsSyntax(interp, paramsPtr, NULL, NULL); // TODO contextObject + listObj = NsfParamDefsSyntax(interp, paramsPtr, NULL, NULL); Tcl_SetObjResult(interp, listObj); DECR_REF_COUNT2("paramDefsObj", listObj); break; @@ -26998,7 +27005,7 @@ Tcl_Obj *varObj = Tcl_ObjGetVar2(interp, paramPtr->nameObj, NULL, TCL_PARSE_PART1); if (varObj == NULL) { - Tcl_Obj *paramDefsObj = NsfParamDefsSyntax(interp, paramDefs->paramsPtr, object, NULL); // TODO contextObject? + Tcl_Obj *paramDefsObj = NsfParamDefsSyntax(interp, paramDefs->paramsPtr, object, NULL); NsfPrintError(interp, "required argument '%s' is missing, should be:\n\t%s%s%s %s", paramPtr->nameObj ? ObjStr(paramPtr->nameObj) : paramPtr->name, @@ -28976,7 +28983,9 @@ {-argName "pattern" -required 0} } */ - +/* + * Actually, this method (object::info::objectparameter) is not used anymore. + */ static int NsfObjInfoObjectparameterMethod(Tcl_Interp *interp, NsfObject *object, int subcmd, CONST char *pattern) { NsfParsedParam parsedParam; @@ -29012,16 +29021,16 @@ switch (subcmd) { case InfoobjectparametersubcmdDefinitionsIdx: - listObj = ParamDefsFormat(interp, paramsPtr, NULL, NULL); // TODO contextObject + listObj = ParamDefsFormat(interp, paramsPtr, NULL, NULL); break; case InfoobjectparametersubcmdListIdx: - listObj = ParamDefsList(interp, paramsPtr, NULL, NULL); // TODO contextObject + listObj = ParamDefsList(interp, paramsPtr, NULL, NULL); break; case InfoobjectparametersubcmdNamesIdx: - listObj = ParamDefsNames(interp, paramsPtr, NULL, NULL); // TODO contextObject + listObj = ParamDefsNames(interp, paramsPtr, NULL, NULL); break; case InfoobjectparametersubcmdSyntaxIdx: - listObj = NsfParamDefsSyntax(interp, paramsPtr, NULL, NULL); // TODO contextObject + listObj = NsfParamDefsSyntax(interp, paramsPtr, NULL, NULL); break; } assert(listObj);