Index: TODO =================================================================== diff -u -r2872e1f0a6523c7fb44952492e05414c4f8d9c84 -r70dc2dc002db419eca126e8af372e0920ceb5a8a --- TODO (.../TODO) (revision 2872e1f0a6523c7fb44952492e05414c4f8d9c84) +++ TODO (.../TODO) (revision 70dc2dc002db419eca126e8af372e0920ceb5a8a) @@ -4418,12 +4418,14 @@ /cls/ info slots ?-type /type/? ?-closure? ?-source all|application|baseclasses? ?/pattern/? /obj/ info object slots ?-type /type/? ?/pattern/? - /obj/ info slot definition /obj/ /obj/ info lookup slots ?-type /type/? ?-source all|application|baseclasses? ?/pattern/? - nx.tcl: handle "incremental" in slot reconfigure - nx.tcl: change defaultAccessor to "none" +- dropped "/obj/ info slot definition /obj/" in favor of + "/slotobj/ definition" + ======================================================================== TODO: - valuechangedcmd implemented via initcmd does Index: library/nx/nx.tcl =================================================================== diff -u -r2872e1f0a6523c7fb44952492e05414c4f8d9c84 -r70dc2dc002db419eca126e8af372e0920ceb5a8a --- library/nx/nx.tcl (.../nx.tcl) (revision 2872e1f0a6523c7fb44952492e05414c4f8d9c84) +++ library/nx/nx.tcl (.../nx.tcl) (revision 70dc2dc002db419eca126e8af372e0920ceb5a8a) @@ -713,9 +713,6 @@ :method "info object slots" {{-type:class ::nx::Slot} pattern:optional} { return [: ::nsf::methods::object::info::slotobjects -type $type {*}[current args]] } - :method "info slot definition" {slot:object} { - return [$slot getPropertyDefinition] - } # # Parameter extractors # @@ -1365,7 +1362,7 @@ return [list ${:domain} {*}$mod $methodName {*}$opts $parameterSpec] } - ObjectParameterSlot public method getPropertyDefinition {} { + ObjectParameterSlot public method definition {} { set options [:getParameterOptions -withMultiplicity true] if {[info exists :positional]} {lappend options positional} #if {!${:config}} {lappend options noconfig} Index: tests/info-method.test =================================================================== diff -u -r2872e1f0a6523c7fb44952492e05414c4f8d9c84 -r70dc2dc002db419eca126e8af372e0920ceb5a8a --- tests/info-method.test (.../info-method.test) (revision 2872e1f0a6523c7fb44952492e05414c4f8d9c84) +++ tests/info-method.test (.../info-method.test) (revision 70dc2dc002db419eca126e8af372e0920ceb5a8a) @@ -733,7 +733,7 @@ ? {lsort [::nx::Object info methods "slots"]} "" ? {lsort [::nx::Object info methods "*slots*"]} "" ? {lsort [::nx::Object info methods -path "*slot*"]} \ - "{info lookup slots} {info object slots} {info slot definition}" + "{info lookup slots} {info object slots}" ? {lsort [::nx::Object info methods -path "*filter*"]} \ "{info lookup filter} {info object filter guard} {info object filter methods} {object filter}" Index: tests/parameters.test =================================================================== diff -u -r2872e1f0a6523c7fb44952492e05414c4f8d9c84 -r70dc2dc002db419eca126e8af372e0920ceb5a8a --- tests/parameters.test (.../parameters.test) (revision 2872e1f0a6523c7fb44952492e05414c4f8d9c84) +++ tests/parameters.test (.../parameters.test) (revision 70dc2dc002db419eca126e8af372e0920ceb5a8a) @@ -2261,7 +2261,7 @@ ? {C info configure syntax} "/::C/ ?-a /value/? ?-volatile? ?-noinit? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initcmd/?" ? {C info configure parameters v} "" - ? {C info slot definition [C info slots v]} "::C variable -accessor none v v0" + ? {[C info slots v] definition} "::C variable -accessor none v v0" # ? {C info parameter list v} "" # ? {C info configure parameter v} "" @@ -2423,7 +2423,7 @@ # # Test slots with configparameter true/false, accessor true/false -# against "info slot definitions" and "info parameter" +# against "slot definitions" and "info parameter" # nx::Test case class-info-slots-types { # @@ -2441,7 +2441,7 @@ # "v" does show up in "info slot ..." ? {C info slots} "::C::slot::v" - ? {C info slot definition ::C::slot::v} "::C variable -accessor none v 100" + ? {::C::slot::v definition} "::C variable -accessor none v 100" nx::Class create D { :property -accessor public {p0 200} @@ -2479,8 +2479,8 @@ # only the variables with slots show up in "info slot ..." ? {o1 info object slots} "::o1::per-object-slot::v2 ::o1::per-object-slot::v1" - ? {o1 info slot definition ::o1::per-object-slot::v2} "::o1 object variable -accessor public v2:0..n 100" - ? {o1 info slot definition ::o1::per-object-slot::v1} "::o1 object variable -accessor public v1 100" + ? {::o1::per-object-slot::v2 definition} "::o1 object variable -accessor public v2:0..n 100" + ? {::o1::per-object-slot::v1 definition} "::o1 object variable -accessor public v1 100" nx::Object create o2 { :object property -accessor public {p0 200} @@ -2494,9 +2494,9 @@ # all properties with slots show up in "info slot" ? {o2 info object slots} "::o2::per-object-slot::p0 ::o2::per-object-slot::p1 ::o2::per-object-slot::p3" - ? {o2 info slot definition [o2 info object slots p0]} "::o2 object property -accessor public {p0 200}" - ? {o2 info slot definition [o2 info object slots p1]} "::o2 object property -accessor none {p1 201}" - ? {o2 info slot definition [o2 info object slots p3]} "::o2 object variable -accessor public p3 203" + ? {[o2 info object slots p0] definition} "::o2 object property -accessor public {p0 200}" + ? {[o2 info object slots p1] definition} "::o2 object property -accessor none {p1 201}" + ? {[o2 info object slots p3] definition} "::o2 object variable -accessor public p3 203" #? {o2 info properties} "{p0 200} {p1 201} {p3:noconfig 203}" @@ -2514,8 +2514,8 @@ :property {b 1} } - ? {Foo info slot definition [Foo info slots a]} "::Foo property -accessor none a" - ? {Foo info slot definition [Foo info slots b]} "::Foo property -accessor none {b 1}" + ? {[Foo info slots a] definition} "::Foo property -accessor none a" + ? {[Foo info slots b] definition} "::Foo property -accessor none {b 1}" #? {Foo info properties} "a {b 1}" @@ -2524,26 +2524,26 @@ :property a:boolean :property {b:integer 1} } - ? {Foo info slot definition [Foo info slots a]} "::Foo property -accessor none a:boolean" - ? {Foo info slot definition [Foo info slots b]} "::Foo property -accessor none {b:integer 1}" + ? {[Foo info slots a] definition} "::Foo property -accessor none a:boolean" + ? {[Foo info slots b] definition} "::Foo property -accessor none {b:integer 1}" # required/optional properties nx::Class create Foo { :property a:required :property b:boolean,required } - ? {Foo info slot definition [Foo info slots a]} "::Foo property -accessor none a:required" - ? {Foo info slot definition [Foo info slots b]} "::Foo property -accessor none b:boolean,required" + ? {[Foo info slots a] definition} "::Foo property -accessor none a:required" + ? {[Foo info slots b] definition} "::Foo property -accessor none b:boolean,required" # properties with multiplicity nx::Class create Foo { :property {ints:integer,0..n ""} :property objs:object,1..n :property obj:object,0..1 } - ? {Foo info slot definition [Foo info slots objs]} "::Foo property -accessor none objs:object,1..n" - ? {Foo info slot definition [Foo info slots ints]} "::Foo property -accessor none {ints:integer,0..n {}}" - ? {Foo info slot definition [Foo info slots obj]} "::Foo property -accessor none obj:object,0..1" + ? {[Foo info slots objs] definition} "::Foo property -accessor none objs:object,1..n" + ? {[Foo info slots ints] definition} "::Foo property -accessor none {ints:integer,0..n {}}" + ? {[Foo info slots obj] definition} "::Foo property -accessor none obj:object,0..1" } # Index: tests/plain-object-method.test =================================================================== diff -u -r31404a50d429bd67e904a70797c4f67674fab09f -r70dc2dc002db419eca126e8af372e0920ceb5a8a --- tests/plain-object-method.test (.../plain-object-method.test) (revision 31404a50d429bd67e904a70797c4f67674fab09f) +++ tests/plain-object-method.test (.../plain-object-method.test) (revision 70dc2dc002db419eca126e8af372e0920ceb5a8a) @@ -11,7 +11,7 @@ ? {o filter f} "::o: unable to dispatch method 'filter'" ? {lsort [o info object methods]} "f" - ? {lsort [o info]} "valid submethods of ::o info: children class has info is lookup name object parameter parent precedence slot vars" + ? {lsort [o info]} "valid submethods of ::o info: children class has info is lookup name object parameter parent precedence vars" } package require nx::plain-object-method @@ -37,5 +37,5 @@ ? {o info filter methods} "" ? {lsort [o info object methods]} "f foo" - ? {lsort [o info]} "valid submethods of ::o info: children class filter has info is lookup method methods mixin name object parameter parent precedence slot vars" + ? {lsort [o info]} "valid submethods of ::o info: children class filter has info is lookup method methods mixin name object parameter parent precedence vars" } Index: tests/properties.test =================================================================== diff -u -r2872e1f0a6523c7fb44952492e05414c4f8d9c84 -r70dc2dc002db419eca126e8af372e0920ceb5a8a --- tests/properties.test (.../properties.test) (revision 2872e1f0a6523c7fb44952492e05414c4f8d9c84) +++ tests/properties.test (.../properties.test) (revision 70dc2dc002db419eca126e8af372e0920ceb5a8a) @@ -46,17 +46,17 @@ ? {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" - ? {C info slot definition ::C::slot::a} "::C property -accessor none {a a1}" - ? {C info slot definition ::C::slot::b} "::C property -accessor public {b b1}" - ? {C info slot definition ::C::slot::c} "::C variable -accessor protected c c1" - ? {C info slot definition ::C::slot::____C.d} "::C variable -accessor private d d1" - ? {C info slot definition ::C::slot::e} "::C property -accessor none {e e1}" - ? {C info slot definition ::C::slot::va} "::C variable -accessor none va va1" - ? {C info slot definition ::C::slot::vb} "::C variable -accessor public vb vb1" - ? {C info slot definition ::C::slot::vc} "::C variable -accessor protected vc vc1" - ? {C info slot definition ::C::slot::____C.vd} "::C variable -accessor private vd vd1" - ? {C info slot definition ::C::slot::ve} "::C variable -accessor none ve ve1" - ? {C info slot definition ::C::slot::vf} "::C variable -accessor none vf vf1" + ? {::C::slot::a definition} "::C property -accessor none {a a1}" + ? {::C::slot::b definition} "::C property -accessor public {b b1}" + ? {::C::slot::c definition} "::C variable -accessor protected c c1" + ? {::C::slot::____C.d definition} "::C variable -accessor private d d1" + ? {::C::slot::e definition} "::C property -accessor none {e e1}" + ? {::C::slot::va definition} "::C variable -accessor none va va1" + ? {::C::slot::vb definition} "::C variable -accessor public vb vb1" + ? {::C::slot::vc definition} "::C variable -accessor protected vc vc1" + ? {::C::slot::____C.vd definition} "::C variable -accessor private vd vd1" + ? {::C::slot::ve definition} "::C variable -accessor none ve ve1" + ? {::C::slot::vf definition} "::C variable -accessor none vf vf1" ? {c1 cget -a} a1 Index: tests/submethods.test =================================================================== diff -u -r31404a50d429bd67e904a70797c4f67674fab09f -r70dc2dc002db419eca126e8af372e0920ceb5a8a --- tests/submethods.test (.../submethods.test) (revision 31404a50d429bd67e904a70797c4f67674fab09f) +++ tests/submethods.test (.../submethods.test) (revision 70dc2dc002db419eca126e8af372e0920ceb5a8a) @@ -229,7 +229,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 has info is lookup name object parameter parent precedence slot vars" + ? {lsort [o1 info]} "valid submethods of ::o1 info: children class has info is lookup name object parameter parent precedence vars" # returning methodpath in ensemble ? {o1 info has something path} "info has something path"