Index: TODO =================================================================== diff -u -r27030b244334e022169ea7143ce6d91257a8b653 -r386420862057241aeeaa8034670634b0da02378b --- TODO (.../TODO) (revision 27030b244334e022169ea7143ce6d91257a8b653) +++ TODO (.../TODO) (revision 386420862057241aeeaa8034670634b0da02378b) @@ -5096,6 +5096,7 @@ - extended regression test - reworked error message generation of slot-forwarder (list all available slot methods with prefix value=) +- cleaned up relation slot mixin variants xotcl2: - use xotcl::RelationSlot instead of nx::Relationslot in xotcl2 @@ -5106,9 +5107,6 @@ ======================================================================== TODO: -- TODO: demangle "slotassign" in "ObjectParameterSlot protected method getParameterOptions" - and check interactions -- TODO: clean up relation slot mixin variants - TODO: define setters for traits - TODO: paths in sublibs in regression test incorrect - TODO: rename "slotassign" to "slotset"? Index: library/nx/nx.tcl =================================================================== diff -u -r27030b244334e022169ea7143ce6d91257a8b653 -r386420862057241aeeaa8034670634b0da02378b --- library/nx/nx.tcl (.../nx.tcl) (revision 27030b244334e022169ea7143ce6d91257a8b653) +++ library/nx/nx.tcl (.../nx.tcl) (revision 386420862057241aeeaa8034670634b0da02378b) @@ -1380,7 +1380,9 @@ } else { lappend options ${:disposition} } - if {${:name} ne ${:methodname}} {lappend options method=${:methodname}} + if {${:name} ne ${:methodname}} { + lappend options method=${:methodname} + } if {${:required}} { lappend options required } elseif {[info exists :positional] && ${:positional}} { @@ -1630,71 +1632,30 @@ # mixin # filter - if {0} { - ::nx::RelationSlot create ::nx::Object::slot::object-mixin \ - -multiplicity 0..n \ - -methodname "::nx::Object::slot::__object::mixin" \ - -settername "object mixin" -forwardername object-mixin -elementtype mixinreg - } - if {1} { - ::nx::RelationSlot create ::nx::Object::slot::object-mixin \ - -multiplicity 0..n \ - -defaultmethods {} \ - -disposition slotassign \ - -settername "object mixin" -forwardername object-mixin -elementtype mixinreg - } - if {0} { - ::nx::RelationSlot create ::nx::Object::slot::object-filter \ - -methodname "::nx::Object::slot::__object::filter" \ - -multiplicity 0..n \ - -settername "object filter" -forwardername object-filter -elementtype filterreg - } - if {1} { - ::nx::RelationSlot create ::nx::Object::slot::object-filter \ - -multiplicity 0..n \ - -defaultmethods {} \ - -disposition slotassign \ - -settername "object filter" -forwardername object-filter -elementtype filterreg - } + ::nx::RelationSlot create ::nx::Object::slot::object-mixin \ + -multiplicity 0..n \ + -defaultmethods {} \ + -disposition slotassign \ + -settername "object mixin" -forwardername object-mixin -elementtype mixinreg - if {0} { - #puts stderr =============1 - ::nx::RelationSlot create ::nx::Class::slot::mixin \ - -multiplicity 0..n \ - -methodname "mixin set" \ - -defaultmethods {get} \ - -forwardername "class-mixin" -elementtype mixinreg - } - if {0} { - #puts stderr =============2 - ::nx::RelationSlot create ::nx::Class::slot::mixin \ - -multiplicity 0..n \ - -methodname "::nx::Class::slot::mixin set %self class-mixin" \ - -disposition forward \ - -forwardername "class-mixin" -elementtype mixinreg - } - if {1} { - ::nx::RelationSlot create ::nx::Class::slot::mixin \ - -multiplicity 0..n \ - -defaultmethods {} \ - -disposition slotassign \ - -forwardername "class-mixin" -elementtype mixinreg - } + ::nx::RelationSlot create ::nx::Object::slot::object-filter \ + -multiplicity 0..n \ + -defaultmethods {} \ + -disposition slotassign \ + -settername "object filter" -forwardername object-filter -elementtype filterreg - if {0} { - ::nx::RelationSlot create ::nx::Class::slot::filter \ - -multiplicity 0..n \ - -forwardername class-filter -elementtype filterreg - } - if {1} { - ::nx::RelationSlot create ::nx::Class::slot::filter \ - -multiplicity 0..n \ - -defaultmethods {} \ - -disposition slotassign \ - -forwardername class-filter -elementtype filterreg - } + ::nx::RelationSlot create ::nx::Class::slot::mixin \ + -multiplicity 0..n \ + -defaultmethods {} \ + -disposition slotassign \ + -forwardername "class-mixin" -elementtype mixinreg - + ::nx::RelationSlot create ::nx::Class::slot::filter \ + -multiplicity 0..n \ + -defaultmethods {} \ + -disposition slotassign \ + -forwardername class-filter -elementtype filterreg + # # Define "class" as a ObjectParameterSlot defined as alias #