Index: TODO =================================================================== diff -u -r1cff689f123bad35c4e3358527e2efa18f53c838 -r1d20679c48b53f85dcfd6d0be12a06c0776e797d --- TODO (.../TODO) (revision 1cff689f123bad35c4e3358527e2efa18f53c838) +++ TODO (.../TODO) (revision 1d20679c48b53f85dcfd6d0be12a06c0776e797d) @@ -2491,6 +2491,10 @@ nsf: * added CallDirectly() wrapper for calls to "init" + + * reactivated "configure", since we plan to use it more prominently + * added a configure flag for "class" + * removed method "class" (should be used via "/obj/ configure -class ...") TODO: Index: library/nx/nx.tcl =================================================================== diff -u -r76f87e0664b26cfcd11ae3dc817303c97b553e5c -r1d20679c48b53f85dcfd6d0be12a06c0776e797d --- library/nx/nx.tcl (.../nx.tcl) (revision 76f87e0664b26cfcd11ae3dc817303c97b553e5c) +++ library/nx/nx.tcl (.../nx.tcl) (revision 1d20679c48b53f85dcfd6d0be12a06c0776e797d) @@ -38,7 +38,7 @@ # foreach cmd [info command ::nsf::methods::object::*] { set cmdName [namespace tail $cmd] - if {$cmdName in [list "autoname" "cleanup" "configure" "exists" \ + if {$cmdName in [list "autoname" "cleanup" "exists" \ "filterguard" "instvar" "mixinguard" \ "noinit" "requirenamespace"]} continue ::nsf::method::alias Object $cmdName $cmd @@ -1032,12 +1032,9 @@ # Register system slots ############################################ proc register_system_slots {os} { - - # method "class" is a plain forwarder to relation (no slot) - ::nsf::method::forward ${os}::Object class ::nsf::relation %self class - - # all other relation cmds are defined as slots - + # + # Most system slots are RelationSlots + # ::nx::RelationSlot create ${os}::Class::slot::superclass \ -default ${os}::Object @@ -1060,12 +1057,24 @@ ::nx::ObjectParameterSlot create ${os}::Class::slot::object-filter \ -methodname "::nsf::classes::nx::Object::filter" + # + # Create object parameter slots for "attributes", "noninit" and "volatile" + # ::nx::ObjectParameterSlot create ${os}::Class::slot::attributes ::nx::ObjectParameterSlot create ${os}::Object::slot::noinit \ -methodname ::nsf::methods::object::noinit -noarg true ::nx::ObjectParameterSlot create ${os}::Object::slot::volatile -noarg true # + # create "class" as a ObjectParameterSlot + # + # method "class" is a plain forwarder to relation (no slot) + #::nsf::method::forward ${os}::Object class ::nsf::relation %self class + + ::nx::ObjectParameterSlot create ${os}::Object::slot::class \ + -methodname "::nsf::relation %self class" -disposition forward + + # # Define method "guard" for mixin- and filter-slots of Object and Class # ${os}::Object::slot::filter method guard {obj prop filter guard:optional} { Index: library/xotcl/tests/slottest.xotcl =================================================================== diff -u -r65f8883a4596ea98365b7de1652700e3ac7394cc -r1d20679c48b53f85dcfd6d0be12a06c0776e797d --- library/xotcl/tests/slottest.xotcl (.../slottest.xotcl) (revision 65f8883a4596ea98365b7de1652700e3ac7394cc) +++ library/xotcl/tests/slottest.xotcl (.../slottest.xotcl) (revision 1d20679c48b53f85dcfd6d0be12a06c0776e797d) @@ -107,7 +107,7 @@ # "class" is not multivalued, therefore we should not add (or remove) add/delete # from the set of subcommands... -? {::nx::RelationSlot class} "::nx::MetaSlot" +? {::nx::RelationSlot info class} "::nx::MetaSlot" O o1 ? {o1 class} "::O" o1 class Object Index: tests/info-method.test =================================================================== diff -u -r1cff689f123bad35c4e3358527e2efa18f53c838 -r1d20679c48b53f85dcfd6d0be12a06c0776e797d --- tests/info-method.test (.../info-method.test) (revision 1cff689f123bad35c4e3358527e2efa18f53c838) +++ tests/info-method.test (.../info-method.test) (revision 1d20679c48b53f85dcfd6d0be12a06c0776e797d) @@ -68,8 +68,8 @@ ? {::nx::Object info lookup methods -source application} "" ? {::nx::Class info lookup methods -source application} "" - set object_methods "alias attribute class contains copy destroy eval filter forward info method mixin move protected public require volatile" - set class_methods "alias attribute attributes class class-object contains copy create destroy eval filter forward info method mixin move new protected public require superclass volatile" + set object_methods "alias attribute configure contains copy destroy eval filter forward info method mixin move protected public require volatile" + set class_methods "alias attribute attributes class-object configure contains copy create destroy eval filter forward info method mixin move new protected public require superclass volatile" ? {lsort [::nx::Object info lookup methods -source baseclasses]} $class_methods ? {lsort [::nx::Class info lookup methods -source baseclasses]} $class_methods @@ -234,7 +234,7 @@ } D create d1 - ? {D info lookup slots} "::nx::Class::slot::object-mixin ::nx::Class::slot::mixin ::nx::Class::slot::superclass ::nx::Class::slot::object-filter ::nx::Class::slot::filter ::nx::Class::slot::attributes ::nx::Object::slot::volatile ::nx::Object::slot::noinit" + ? {D info lookup slots} "::nx::Class::slot::object-mixin ::nx::Class::slot::mixin ::nx::Class::slot::superclass ::nx::Class::slot::object-filter ::nx::Class::slot::filter ::nx::Class::slot::attributes ::nx::Object::slot::volatile ::nx::Object::slot::noinit ::nx::Object::slot::class" ? {D info slots} "::D::slot::b ::D::slot::a2 ::D::slot::c" ? {::nx::Object info method parameter info} "" } Index: tests/parameters.test =================================================================== diff -u -r1cff689f123bad35c4e3358527e2efa18f53c838 -r1d20679c48b53f85dcfd6d0be12a06c0776e797d --- tests/parameters.test (.../parameters.test) (revision 1cff689f123bad35c4e3358527e2efa18f53c838) +++ tests/parameters.test (.../parameters.test) (revision 1d20679c48b53f85dcfd6d0be12a06c0776e797d) @@ -249,10 +249,10 @@ C create c1 ? {C eval {:objectparameter}} \ - "-object-mixin:alias,arg=::nsf::classes::nx::Object::mixin -mixin:alias {-superclass:alias ::nx::Object} -object-filter:alias,arg=::nsf::classes::nx::Object::filter -filter:alias -attributes:alias -volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg __initcmd:initcmd,optional" + "-object-mixin:alias,arg=::nsf::classes::nx::Object::mixin -mixin:alias {-superclass:alias ::nx::Object} -object-filter:alias,arg=::nsf::classes::nx::Object::filter -filter:alias -attributes:alias -volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg {{-class:forward,arg=::nsf::relation %self class}} __initcmd:initcmd,optional" ? {c1 eval {:objectparameter}} \ - "-a -b:boolean {-c 1} -volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg -mixin:alias -filter:alias __initcmd:initcmd,optional" + "-a -b:boolean {-c 1} -volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg -mixin:alias {{-class:forward,arg=::nsf::relation %self class}} -filter:alias __initcmd:initcmd,optional" } ####################################################### @@ -263,15 +263,15 @@ Class create C -attributes {a {b:boolean} {c 1}} C create c1 - c1 class Object + c1 configure -class Object ? {c1 eval :objectparameter} \ - "-volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg -mixin:alias -filter:alias __initcmd:initcmd,optional" + "-volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg -mixin:alias {{-class:forward,arg=::nsf::relation %self class}} -filter:alias __initcmd:initcmd,optional" Class create D -superclass C -attributes {d:required} D create d1 -d 100 ? {d1 eval :objectparameter} \ - "-d:required -a -b:boolean {-c 1} -volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg -mixin:alias -filter:alias __initcmd:initcmd,optional" + "-d:required -a -b:boolean {-c 1} -volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg -mixin:alias {{-class:forward,arg=::nsf::relation %self class}} -filter:alias __initcmd:initcmd,optional" } ####################################################### @@ -287,27 +287,27 @@ Class create M2 -attributes {b2} D mixin M ? {d1 eval :objectparameter} \ - "-b -m1 -m2 -d:required -a {-c 1} -volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg -mixin:alias -filter:alias __initcmd:initcmd,optional" \ + "-b -m1 -m2 -d:required -a {-c 1} -volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg -mixin:alias {{-class:forward,arg=::nsf::relation %self class}} -filter:alias __initcmd:initcmd,optional" \ "mixin added" M mixin M2 ? {d1 eval :objectparameter} \ - "-b2 -b -m1 -m2 -d:required -a {-c 1} -volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg -mixin:alias -filter:alias __initcmd:initcmd,optional" \ + "-b2 -b -m1 -m2 -d:required -a {-c 1} -volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg -mixin:alias {{-class:forward,arg=::nsf::relation %self class}} -filter:alias __initcmd:initcmd,optional" \ "transitive mixin added" D mixin "" #we should have again the old interface ? {d1 eval :objectparameter} \ - "-d:required -a -b:boolean {-c 1} -volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg -mixin:alias -filter:alias __initcmd:initcmd,optional" + "-d:required -a -b:boolean {-c 1} -volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg -mixin:alias {{-class:forward,arg=::nsf::relation %self class}} -filter:alias __initcmd:initcmd,optional" C mixin M ? {d1 eval :objectparameter} \ - "-b2 -b -m1 -m2 -d:required -a {-c 1} -volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg -mixin:alias -filter:alias __initcmd:initcmd,optional" \ + "-b2 -b -m1 -m2 -d:required -a {-c 1} -volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg -mixin:alias {{-class:forward,arg=::nsf::relation %self class}} -filter:alias __initcmd:initcmd,optional" \ "mixin added" C mixin "" #we should have again the old interface ? {d1 eval :objectparameter} \ - "-d:required -a -b:boolean {-c 1} -volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg -mixin:alias -filter:alias __initcmd:initcmd,optional" + "-d:required -a -b:boolean {-c 1} -volatile:alias,noarg -noinit:alias,arg=::nsf::methods::object::noinit,noarg -mixin:alias {{-class:forward,arg=::nsf::relation %self class}} -filter:alias __initcmd:initcmd,optional" } #######################################################