Index: TODO =================================================================== diff -u -rf93a2f18571f5f0fe266cd26299f463d55f0ac2d -r625a3e7b5660331938ab739fb28eda3d5540e189 --- TODO (.../TODO) (revision f93a2f18571f5f0fe266cd26299f463d55f0ac2d) +++ TODO (.../TODO) (revision 625a3e7b5660331938ab739fb28eda3d5540e189) @@ -4544,8 +4544,13 @@ underscore) - completed coverage if plain-object-method.tcl -- provide warnings via plain-object-method.tcl via "nsf::log warn ..." +- provided warnings via plain-object-method.tcl via "nsf::log warn ..." +nsf.c +- fixed potential inifinite loop in pattern matching for precedence lists +- cget: make error message closer to tcl conventions +- extended regression test + ======================================================================== TODO: Index: generic/nsf.c =================================================================== diff -u -r2f6bcca3537584c8ef1f9fc71b230e79d1560504 -r625a3e7b5660331938ab739fb28eda3d5540e189 --- generic/nsf.c (.../nsf.c) (revision 2f6bcca3537584c8ef1f9fc71b230e79d1560504) +++ generic/nsf.c (.../nsf.c) (revision 625a3e7b5660331938ab739fb28eda3d5540e189) @@ -7199,15 +7199,15 @@ MixinComputeDefined(interp, object); } if (object->flags & NSF_MIXIN_ORDER_DEFINED_AND_VALID) { - NsfCmdList *ml = object->mixinOrder; + NsfCmdList *ml; - while (ml) { + for (ml = object->mixinOrder; ml; ml = ml->nextPtr) { NsfClass *mixin = NsfGetClassFromCmdPtr(ml->cmdPtr); - if (pattern) { - if (!Tcl_StringMatch(ClassName(mixin), pattern)) continue; + + if (pattern && !Tcl_StringMatch(ClassName(mixin), pattern)) { + continue; } npl = NsfClassListAdd(npl, mixin, NULL); - ml = ml->nextPtr; } } } @@ -22652,7 +22652,7 @@ } if (!found) { - result = NsfPrintError(interp, "cget: cannot lookup parameter value for %s", nameString); + result = NsfPrintError(interp, "cget: unknown configure parameter %s", nameString); goto cget_exit; } Index: tests/cget.test =================================================================== diff -u -r2f6bcca3537584c8ef1f9fc71b230e79d1560504 -r625a3e7b5660331938ab739fb28eda3d5540e189 --- tests/cget.test (.../cget.test) (revision 2f6bcca3537584c8ef1f9fc71b230e79d1560504) +++ tests/cget.test (.../cget.test) (revision 625a3e7b5660331938ab739fb28eda3d5540e189) @@ -35,8 +35,8 @@ # - parameter without a value # ? {p1 cget} {wrong # of arguments: should be "cget /name/"} - ? {p1 cget -foo} {cget: cannot lookup parameter value for -foo} - ? {p1 cget foo} {cget: cannot lookup parameter value for foo} + ? {p1 cget -foo} "cget: unknown configure parameter -foo" + ? {p1 cget foo} "cget: unknown configure parameter foo" ? {p1 cget -sex} {can't read "sex": no such variable} # Index: tests/info-method.test =================================================================== diff -u -r2f6bcca3537584c8ef1f9fc71b230e79d1560504 -r625a3e7b5660331938ab739fb28eda3d5540e189 --- tests/info-method.test (.../info-method.test) (revision 2f6bcca3537584c8ef1f9fc71b230e79d1560504) +++ tests/info-method.test (.../info-method.test) (revision 625a3e7b5660331938ab739fb28eda3d5540e189) @@ -993,10 +993,13 @@ B create b1 ? {B info heritage} "::A ::nx::Object" ? {b1 info precedence} "::B ::A ::nx::Object" + ? {b1 info precedence ::M*} "" A mixin {M1 M2} ? {B info heritage} "::M1 ::M2 ::A ::nx::Object" ? {b1 info precedence} "::M1 ::M2 ::B ::A ::nx::Object" + ? {b1 info precedence ::M*} "::M1 ::M2" + ? {b1 info precedence ::X*} "" b1 object mixin {M1 M1 M4} ? {b1 info precedence} "::M1 ::M4 ::M2 ::B ::A ::nx::Object" Index: tests/properties.test =================================================================== diff -u -r2f6bcca3537584c8ef1f9fc71b230e79d1560504 -r625a3e7b5660331938ab739fb28eda3d5540e189 --- tests/properties.test (.../properties.test) (revision 2f6bcca3537584c8ef1f9fc71b230e79d1560504) +++ tests/properties.test (.../properties.test) (revision 625a3e7b5660331938ab739fb28eda3d5540e189) @@ -61,14 +61,14 @@ ? {c1 cget -a} a1 ? {c1 cget -b} b1 - ? {c1 cget -c} {cget: cannot lookup parameter value for -c} - ? {c1 cget -d} {cget: cannot lookup parameter value for -d} - ? {c1 cget -va} {cget: cannot lookup parameter value for -va} - ? {c1 cget -vb} {cget: cannot lookup parameter value for -vb} - ? {c1 cget -vc} {cget: cannot lookup parameter value for -vc} - ? {c1 cget -vd} {cget: cannot lookup parameter value for -vd} - ? {c1 cget -ve} {cget: cannot lookup parameter value for -ve} - ? {c1 cget -vf} {cget: cannot lookup parameter value for -vf} + ? {c1 cget -c} "cget: unknown configure parameter -c" + ? {c1 cget -d} "cget: unknown configure parameter -d" + ? {c1 cget -va} "cget: unknown configure parameter -va" + ? {c1 cget -vb} "cget: unknown configure parameter -vb" + ? {c1 cget -vc} "cget: unknown configure parameter -vc" + ? {c1 cget -vd} "cget: unknown configure parameter -vd" + ? {c1 cget -ve} "cget: unknown configure parameter -ve" + ? {c1 cget -vf} "cget: unknown configure parameter -vf" # # No incremental used, so "a" and "e" have no slots @@ -234,12 +234,12 @@ ? {c1 cget -a} a1 ? {c1 cget -b} b1 - ? {c1 cget -c} {cget: cannot lookup parameter value for -c} - ? {c1 cget -d} {cget: cannot lookup parameter value for -d} - ? {c1 cget -va} {cget: cannot lookup parameter value for -va} - ? {c1 cget -vb} {cget: cannot lookup parameter value for -vb} - ? {c1 cget -vc} {cget: cannot lookup parameter value for -vc} - ? {c1 cget -vd} {cget: cannot lookup parameter value for -vd} + ? {c1 cget -c} "cget: unknown configure parameter -c" + ? {c1 cget -d} "cget: unknown configure parameter -d" + ? {c1 cget -va} "cget: unknown configure parameter -va" + ? {c1 cget -vb} "cget: unknown configure parameter -vb" + ? {c1 cget -vc} "cget: unknown configure parameter -vc" + ? {c1 cget -vd} "cget: unknown configure parameter -vd" # # The use of "-incremental" implies an accessor @@ -413,12 +413,12 @@ ? {o1 cget -a} a1 ? {o1 cget -b} b1 - ? {o1 cget -c} {cget: cannot lookup parameter value for -c} - ? {o1 cget -d} {cget: cannot lookup parameter value for -d} - ? {o1 cget -va} {cget: cannot lookup parameter value for -va} - ? {o1 cget -vb} {cget: cannot lookup parameter value for -vb} - ? {o1 cget -vc} {cget: cannot lookup parameter value for -vc} - ? {o1 cget -vd} {cget: cannot lookup parameter value for -vd} + ? {o1 cget -c} {cget: unknown configure parameter -c} + ? {o1 cget -d} {cget: unknown configure parameter -d} + ? {o1 cget -va} {cget: unknown configure parameter -va} + ? {o1 cget -vb} {cget: unknown configure parameter -vb} + ? {o1 cget -vc} {cget: unknown configure parameter -vc} + ? {o1 cget -vd} {cget: unknown configure parameter -vd} # @@ -537,12 +537,12 @@ ? {o1 cget -a} a1 ? {o1 cget -b} b1 - ? {o1 cget -c} {cget: cannot lookup parameter value for -c} - ? {o1 cget -d} {cget: cannot lookup parameter value for -d} - ? {o1 cget -va} {cget: cannot lookup parameter value for -va} - ? {o1 cget -vb} {cget: cannot lookup parameter value for -vb} - ? {o1 cget -vc} {cget: cannot lookup parameter value for -vc} - ? {o1 cget -vd} {cget: cannot lookup parameter value for -vd} + ? {o1 cget -c} {cget: unknown configure parameter -c} + ? {o1 cget -d} {cget: unknown configure parameter -d} + ? {o1 cget -va} {cget: unknown configure parameter -va} + ? {o1 cget -vb} {cget: unknown configure parameter -vb} + ? {o1 cget -vc} {cget: unknown configure parameter -vc} + ? {o1 cget -vd} {cget: unknown configure parameter -vd} # # The use of "-incremental" implies an accessor