Index: TODO =================================================================== diff -u -r5b19a3dc88de821cd138d70157ef0bf971a6d09c -r23b10a2c736cf33731b0d7b0381314ddec44f2d6 --- TODO (.../TODO) (revision 5b19a3dc88de821cd138d70157ef0bf971a6d09c) +++ TODO (.../TODO) (revision 23b10a2c736cf33731b0d7b0381314ddec44f2d6) @@ -5162,6 +5162,11 @@ - Updated tutorial and migration guide +nx.tcl +- drop short form "/obj/ info configure" for now +- make output of "/obj/ info lookup configure syntax" equivalent to + "/obj/ info configure" + ======================================================================== TODO: @@ -5182,7 +5187,7 @@ p1 info configure says, how object p1 can be configured p1 info lookup configure syntax says, how object p1 can be configured (long form of above) - p1 configure -help gives a reasonable error message, "p1 configure" does not work, when no args are needed + p1 configure -help gives a reasonable error message, "p1 configure" does not work, since no args are needed Person new -help gives a reasonable error message, except, that "configure" is not perfect Person create just complains about missing name, does not know about configure arguments Person create -help creates an object named "-help" @@ -5193,8 +5198,18 @@ maybe: use "Person info configure" as short form of "Person info configure syntax", or drop it, since the lookup variant is at least not surprising. 2) It would be nice if we would be not to need the "info" at all but improve the errors in 5-9, - maybe special switch "-?" + maybe special switch "-?" or "--" + Tk uses "/obj/ configure" for obtaining possible values + + Furthermore: + The command + p1 info method definition [p1 info lookup method configure] + gives an error, since "info method" is not defined for p1, we could have used + p1 info object method definition [p1 info lookup method configure] + which is somewhat strange, since configure is not an object method. + Probably: nsf-level command for handles. + - fix error message for "C object mixin" returns "::C mixin add|clear|delete|get|guard|set" and not Index: library/nx/nx.tcl =================================================================== diff -u -r4ca122f3c023fe74de3b36c8a65c3145e554aeba -r23b10a2c736cf33731b0d7b0381314ddec44f2d6 --- library/nx/nx.tcl (.../nx.tcl) (revision 4ca122f3c023fe74de3b36c8a65c3145e554aeba) +++ library/nx/nx.tcl (.../nx.tcl) (revision 23b10a2c736cf33731b0d7b0381314ddec44f2d6) @@ -720,7 +720,7 @@ return [: {*}$cmd] } :method "info lookup configure syntax" {} { - set syntax "/[self]/ configure [: ::nsf::methods::object::info::objectparameter syntax]" + set syntax [: ::nsf::methods::object::info::objectparameter syntax] return [string trimright $syntax " "] } :method "info lookup variables" {pattern:optional} { @@ -939,7 +939,7 @@ :public alias cget ::nsf::methods::object::cget :public alias configure ::nsf::methods::object::configure - :public method "info configure" {} {: ::nsf::methods::object::info::objectparameter syntax} + #:public method "info configure" {} {: ::nsf::methods::object::info::objectparameter syntax} } nsf::method::create ::nx::Class::slot::__info::configure defaultmethod {} { uplevel {: ::nsf::methods::object::info::objectparameter syntax} Index: tests/cget.test =================================================================== diff -u -rdd169437c7a701da0063a40978614e6148d71221 -r23b10a2c736cf33731b0d7b0381314ddec44f2d6 --- tests/cget.test (.../cget.test) (revision dd169437c7a701da0063a40978614e6148d71221) +++ tests/cget.test (.../cget.test) (revision 23b10a2c736cf33731b0d7b0381314ddec44f2d6) @@ -53,7 +53,9 @@ # # configure without arguments # - ? {p1 info configure} "?-sex /value/? -famnam /value/ ?-age /integer/? ?-friends /value .../? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?" + ? {p1 configure} "" + + ? {p1 info lookup configure syntax} {?-sex /value/? -famnam /value/ ?-age /integer/? ?-friends /value .../? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} } # @@ -93,8 +95,11 @@ # # configure without arguments # - ? {p1 info configure} "?-bar1 /value/? ?-bar2 /value/? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?" + ? {p1 configure} "" + ? {p1 info lookup configure syntax} {?-bar1 /value/? ?-bar2 /value/? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + + # # test gettin/setting via slots # @@ -137,7 +142,7 @@ # class-level lookup # ? {C info lookup configure syntax} \ - "/::C/ configure ?-superclass /class .../? ?-mixin /mixinreg .../? ?-filter /filterreg .../? ?-volatile? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?" + "?-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} "" ? {C cget -mixin} "" @@ -150,7 +155,7 @@ # object-level lookup # ? {c1 info lookup configure syntax} \ - "/::c1/ configure ?-foo /value/? ?-bar /value/? ?-volatile? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?" + "?-foo /value/? ?-bar /value/? ?-volatile? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?" # # query all properties from base classes Index: tests/parameters.test =================================================================== diff -u -r4ca122f3c023fe74de3b36c8a65c3145e554aeba -r23b10a2c736cf33731b0d7b0381314ddec44f2d6 --- tests/parameters.test (.../parameters.test) (revision 4ca122f3c023fe74de3b36c8a65c3145e554aeba) +++ tests/parameters.test (.../parameters.test) (revision 23b10a2c736cf33731b0d7b0381314ddec44f2d6) @@ -1739,7 +1739,7 @@ ? {d1 configure} "" D property x:required - ? {d1 info configure} \ + ? {d1 info lookup configure syntax} \ "-x /value/ ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?" ? {d1 configure} \ Index: tests/plain-object-method.test =================================================================== diff -u -r0e4ebdb092c8158987489b5c26cf11526b2756f5 -r23b10a2c736cf33731b0d7b0381314ddec44f2d6 --- tests/plain-object-method.test (.../plain-object-method.test) (revision 0e4ebdb092c8158987489b5c26cf11526b2756f5) +++ tests/plain-object-method.test (.../plain-object-method.test) (revision 23b10a2c736cf33731b0d7b0381314ddec44f2d6) @@ -11,7 +11,7 @@ ? {o filter set f} "::o: unable to dispatch method 'filter'" ? {lsort [o info object methods]} "f" - ? {lsort [o info]} "valid submethods of ::o info: children class configure has info lookup name object parent precedence variable vars" + ? {lsort [o info]} "valid submethods of ::o info: children class has info lookup name object parent precedence variable vars" } # @@ -60,7 +60,7 @@ ? {o info filter methods} "" ? {lsort [o info object methods]} "a f foo fwd p v2" - ? {lsort [o info]} "valid submethods of ::o info: children class configure filter has info lookup method methods mixin name object parent precedence slots variable variables vars" + ? {lsort [o info]} "valid submethods of ::o info: children class filter has info lookup method methods mixin name object parent precedence slots variable variables vars" } # Index: tests/properties.test =================================================================== diff -u -rdd169437c7a701da0063a40978614e6148d71221 -r23b10a2c736cf33731b0d7b0381314ddec44f2d6 --- tests/properties.test (.../properties.test) (revision dd169437c7a701da0063a40978614e6148d71221) +++ tests/properties.test (.../properties.test) (revision 23b10a2c736cf33731b0d7b0381314ddec44f2d6) @@ -41,7 +41,7 @@ # # just the public properties are accessible via the configure interface # - ? {c1 info configure} { ?-e /value/? ?-a /value/? ?-b /value/? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {c1 info lookup configure syntax} { ?-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 configure} { ?-e /value .../? ?-a /value .../? ?-b /value .../? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {c1 info lookup configure syntax} { ?-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 configure} { ?-e /value/? ?-a /value/? ?-b /value/? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {o1 info lookup configure syntax} { ?-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 configure} { ?-e /value .../? ?-a /value .../? ?-b /value .../? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {o1 info lookup configure syntax} { ?-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 configure} {?-a /value/? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {c1 info lookup configure syntax} {?-a /value/? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} ? {c1 cget -a} a1 ? {c1 configure -a a2} "" - ? {C info configure} {?-b /value/? ?-superclass /class .../? ?-mixin /mixinreg .../? ?-filter /filterreg .../? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {C info lookup configure syntax} {?-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 configure} { ?-e /value/? ?-a /value/? ?-b /value/? ?-volatile? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {c1 info lookup configure syntax} { ?-e /value/? ?-a /value/? ?-b /value/? ?-volatile? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} set e [C eval :__objectparameter] ? {C eval :__objectparameter} $e @@ -838,7 +838,7 @@ # # check influence of class-level per-object properties # - ? {d1 info configure} { ?-e /value/? ?-a /value/? ?-b /value/? ?-volatile? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {d1 info lookup configure syntax} { ?-e /value/? ?-a /value/? ?-b /value/? ?-volatile? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} set e [D eval :__objectparameter] ? {D eval :__objectparameter} $e @@ -878,7 +878,7 @@ # just the public properties are accessible via the configure interface # - ? {o1 info configure} { ?-e /value/? ?-a /value/? ?-b /value/? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} + ? {o1 info lookup configure syntax} { ?-e /value/? ?-a /value/? ?-b /value/? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?} set e [o1 eval :__objectparameter] Index: tests/submethods.test =================================================================== diff -u -r0e4ebdb092c8158987489b5c26cf11526b2756f5 -r23b10a2c736cf33731b0d7b0381314ddec44f2d6 --- tests/submethods.test (.../submethods.test) (revision 0e4ebdb092c8158987489b5c26cf11526b2756f5) +++ tests/submethods.test (.../submethods.test) (revision 23b10a2c736cf33731b0d7b0381314ddec44f2d6) @@ -230,7 +230,7 @@ # defaultcmd has to return also subcmds of other shadowed ensembles ? {lsort [o1 info has]} "valid submethods of ::o1 info has: mixin namespace something type" ? {lsort [o1 info]} \ - "valid submethods of ::o1 info: children class configure has info lookup name object parent precedence variable vars" + "valid submethods of ::o1 info: children class has info lookup name object parent precedence variable vars" # returning methodpath in ensemble ? {o1 info has something path} "info has something path"