Index: TODO =================================================================== diff -u -r2d9fcf7f4dc9ccd8ac52702850f60724a04bcba4 -rdf2936cf5ecc9a2d5473804c9b5e49b67fc02f50 --- TODO (.../TODO) (revision 2d9fcf7f4dc9ccd8ac52702850f60724a04bcba4) +++ TODO (.../TODO) (revision df2936cf5ecc9a2d5473804c9b5e49b67fc02f50) @@ -4452,13 +4452,15 @@ * "/obj/ delete object property" * "/obj/ delete object variable" -- extended parameter extractor. new functionality - +- extended parameter extractor: new functionality ::nsf::parameter get default /parameter/ ?/varname/? ::nsf::parameter get type /parameter/ /obj/ info parameter get default /parameter/ ?/varname/? /obj/ info parameter get type /parameter/ +- nsf.c: handle full-qualified name for private slots (AddSlotObjects()) +- extended regression test + ======================================================================== TODO: - The two names are not appropriate Index: generic/nsf.c =================================================================== diff -u -r2d9fcf7f4dc9ccd8ac52702850f60724a04bcba4 -rdf2936cf5ecc9a2d5473804c9b5e49b67fc02f50 --- generic/nsf.c (.../nsf.c) (revision 2d9fcf7f4dc9ccd8ac52702850f60724a04bcba4) +++ generic/nsf.c (.../nsf.c) (revision df2936cf5ecc9a2d5473804c9b5e49b67fc02f50) @@ -13835,8 +13835,9 @@ char *valueString = ObjStr(value); match = fullQualPattern ? - Tcl_StringMatch(valueString, pattern+2) : - Tcl_StringMatch(valueString, pattern); + Tcl_StringMatch(ObjectName(childObject), pattern) : + Tcl_StringMatch(valueString, pattern); + } else { match = 0; } Index: tests/info-method.test =================================================================== diff -u -r2d9fcf7f4dc9ccd8ac52702850f60724a04bcba4 -rdf2936cf5ecc9a2d5473804c9b5e49b67fc02f50 --- tests/info-method.test (.../info-method.test) (revision 2d9fcf7f4dc9ccd8ac52702850f60724a04bcba4) +++ tests/info-method.test (.../info-method.test) (revision df2936cf5ecc9a2d5473804c9b5e49b67fc02f50) @@ -493,25 +493,42 @@ nx::Class create C { :property a :property {b 1} + :property -accessor private {x 100} + :object property -accessor private {y 100} } nx::Class create D -superclass C { :property {b 2} :property c :object property -accessor public a2 :method "sub foo" args {;} + :create d1 } ? {D info lookup slots} "::D::per-object-slot::a2 ::nx::Class::slot::superclass ::nx::Class::slot::mixin ::nx::Class::slot::filter ::nx::Object::slot::volatile ::nx::Object::slot::noinit ::nx::Object::slot::object-mixin ::nx::Object::slot::__initcmd ::nx::Object::slot::class ::nx::Object::slot::object-filter" + ? {D info lookup slots superclass} "::nx::Class::slot::superclass" + ? {D info lookup slots ::nx::Class::slot::superclass} "::nx::Class::slot::superclass" + ? {D info lookup slots a2} "::D::per-object-slot::a2" + ? {D info lookup slots ::D::per-object-slot::a2} "::D::per-object-slot::a2" + + ? {d1 info lookup slots b} "::D::slot::b" + ? {d1 info lookup slots ::D::slot::b} "::D::slot::b" + C create c1 ? {c1 info precedence} "::C ::nx::Object" ? {C info heritage} "::nx::Object" - ? {C info slots -closure -source application} "::C::slot::a ::C::slot::b" - ? {C info slots -closure} "::C::slot::a ::C::slot::b ::nx::Object::slot::volatile ::nx::Object::slot::noinit ::nx::Object::slot::object-mixin ::nx::Object::slot::__initcmd ::nx::Object::slot::class ::nx::Object::slot::object-filter" + ? {C info slots -closure -source application} "::C::slot::____C.x ::C::slot::a ::C::slot::b" + ? {C info slots -closure} "::C::slot::____C.x ::C::slot::a ::C::slot::b ::nx::Object::slot::volatile ::nx::Object::slot::noinit ::nx::Object::slot::object-mixin ::nx::Object::slot::__initcmd ::nx::Object::slot::class ::nx::Object::slot::object-filter" - ? {C info slots} "::C::slot::a ::C::slot::b" + ? {C info slots} "::C::slot::____C.x ::C::slot::a ::C::slot::b" + ? {C info slots x} "::C::slot::____C.x" + ? {C info slots ::C::slot::____C.x} "::C::slot::____C.x" + + ? {C info lookup slots y} "::C::per-object-slot::____C.y" + ? {C info lookup slots ::C::per-object-slot::____C.y} "::C::per-object-slot::____C.y" + # Test patterns for "info slots" # Partial name, no metachars ? {C info slots -closure object-mixin} "::nx::Object::slot::object-mixin" @@ -522,10 +539,10 @@ ? {C info slots -closure ::nx::Object::slot::object-mixin} "::nx::Object::slot::object-mixin" # Fully qualified name, with metachars # The following command returns the same as "C info slots" - ? {C info slots -closure ::C::*} "::C::slot::a ::C::slot::b" + ? {C info slots -closure ::C::*} "::C::slot::____C.x ::C::slot::a ::C::slot::b" # The following command returns the slots of D inherited from - # C. Slot "b" is shadoed by D. - ? {D info slots -closure ::C::*} "::C::slot::a" + # C. Slot "b" is shadowed by D. + ? {D info slots -closure ::C::*} "::C::slot::____C.x ::C::slot::a" # Test patterns for "info lookup slots" # Partial name, no metachars @@ -536,21 +553,21 @@ # Fully qualified name, no metachars ? {c1 info lookup slots ::nx::Object::slot::object-mixin} "::nx::Object::slot::object-mixin" # Fully qualified name, with metachars - ? {c1 info lookup slots ::C::*} "::C::slot::a ::C::slot::b" + ? {c1 info lookup slots ::C::*} "::C::slot::____C.x ::C::slot::a ::C::slot::b" D create d1 ? {D info slots} "::D::slot::b ::D::slot::c" - ? {D info slots -closure -source application} "::D::slot::b ::D::slot::c ::C::slot::a" + ? {D info slots -closure -source application} "::D::slot::b ::D::slot::c ::C::slot::____C.x ::C::slot::a" ? {::nx::Object info method parameters info} "" ? {d1 info precedence} "::D ::C ::nx::Object" - ? {d1 info lookup slots} "::D::slot::b ::D::slot::c ::C::slot::a ::nx::Object::slot::volatile ::nx::Object::slot::noinit ::nx::Object::slot::object-mixin ::nx::Object::slot::__initcmd ::nx::Object::slot::class ::nx::Object::slot::object-filter" + ? {d1 info lookup slots} "::D::slot::b ::D::slot::c ::C::slot::____C.x ::C::slot::a ::nx::Object::slot::volatile ::nx::Object::slot::noinit ::nx::Object::slot::object-mixin ::nx::Object::slot::__initcmd ::nx::Object::slot::class ::nx::Object::slot::object-filter" # Fully qualified name, with metachars # The following command returns the slots of D inherited from - # C. Slot "b" is shadoed by D. - ? {d1 info lookup slots ::C::*} "::C::slot::a" + # C. Slot "b" is shadowed by D. + ? {d1 info lookup slots ::C::*} "::C::slot::____C.x ::C::slot::a" } #