Index: TODO =================================================================== diff -u -r14091c15df049d9cdb1417c6f037b333b0b82bdd -rbf8a6fa213583971dfe9eafabaaecd8166c4343d --- TODO (.../TODO) (revision 14091c15df049d9cdb1417c6f037b333b0b82bdd) +++ TODO (.../TODO) (revision bf8a6fa213583971dfe9eafabaaecd8166c4343d) @@ -3682,7 +3682,13 @@ - remove quadratic behavior when adding many classes (10 thousands) - deletion is still for huge number of classes quite slow. +- nx.tcl, xotcl.tcl: + * remove proc "register_system_slots" since 'rename + register_system_slots ""' fails on aolserver + * bump version number to 2.0b1 + + TODO: - warnings for "numeric" names for args and nonpos-args? Index: library/nx/nx.tcl =================================================================== diff -u -rd31c271afb2488abafa0642b07538a3e62106130 -rbf8a6fa213583971dfe9eafabaaecd8166c4343d --- library/nx/nx.tcl (.../nx.tcl) (revision d31c271afb2488abafa0642b07538a3e62106130) +++ library/nx/nx.tcl (.../nx.tcl) (revision bf8a6fa213583971dfe9eafabaaecd8166c4343d) @@ -1,5 +1,5 @@ package require nsf -package provide nx 2.0a1 +package provide nx 2.0b1 namespace eval ::nx { namespace eval ::nsf {}; # make pkg indexer happy @@ -1331,117 +1331,106 @@ # Register system slots ###################################################################### - # Define a temporary, low level interface for defining system slots. - # The proc is removed later in this script. - - proc register_system_slots {os} { - # - # Most system slots are RelationSlots - # - ::nx::RelationSlot create ${os}::Object::slot::mixin \ - -forwardername object-mixin -elementtype mixinreg - ::nx::RelationSlot create ${os}::Object::slot::filter \ - -forwardername object-filter -elementtype filterreg - - ::nx::RelationSlot create ${os}::Class::slot::mixin \ - -forwardername class-mixin -elementtype mixinreg - ::nx::RelationSlot create ${os}::Class::slot::filter \ - -forwardername class-filter -elementtype filterreg - - # - # Create two convenience object parameters to allow configuration - # of per-object mixins and filters for classes. - # - ::nx::ObjectParameterSlot create ${os}::Class::slot::object-mixin \ - -methodname "::nsf::classes::nx::Object::mixin" -elementtype mixinreg - ::nx::ObjectParameterSlot create ${os}::Class::slot::object-filter \ - -methodname "::nsf::classes::nx::Object::filter" -elementtype filterreg - - # - # Create object parameter slots for "noninit" and "volatile" - # - ::nx::ObjectParameterSlot create ${os}::Object::slot::noinit \ - -methodname ::nsf::methods::object::noinit -noarg true - ::nx::ObjectParameterSlot create ${os}::Object::slot::volatile -noarg true - - # - # Define "class" as a ObjectParameterSlot defined as alias - # - ::nx::ObjectParameterSlot create ${os}::Object::slot::class \ - -methodname "::nsf::methods::object::class" -elementtype class - - # - # Define "superclass" as a ObjectParameterSlot defined as alias - # - ::nx::ObjectParameterSlot create ${os}::Class::slot::superclass \ - -methodname "::nsf::methods::class::superclass" \ - -elementtype class \ - -multiplicity 1..n \ - -default ${os}::Object - - # - # Define the initcmd as a positional ObjectParameterSlot - # -# ::nx::ObjectParameterSlot create ${os}::Object::slot::__init \ -# -disposition alias \ -# -methodname "init" \ -# -noarg true \ -# -positional true \ -# -position 1 - - # - # Define the initcmd as a positional ObjectParameterSlot - # - ::nx::ObjectParameterSlot create ${os}::Object::slot::__initcmd \ - -disposition initcmd \ - -noleadingdash true \ - -positional true \ - -position 2 - - # - # Make sure the invalidate all ObjectParameterSlots - # - ::nsf::invalidateobjectparameter ${os}::ObjectParameterSlot - - # - # Define method "guard" for mixin- and filter-slots of Object and Class - # - ${os}::Object::slot::filter method guard {obj prop filter guard:optional} { - if {[info exists guard]} { - ::nsf::directdispatch $obj ::nsf::methods::object::filterguard $filter $guard - } else { - $obj info filter guard $filter - } + # + # Most system slots are RelationSlots + # + ::nx::RelationSlot create ::nx::Object::slot::mixin \ + -forwardername object-mixin -elementtype mixinreg + ::nx::RelationSlot create ::nx::Object::slot::filter \ + -forwardername object-filter -elementtype filterreg + + ::nx::RelationSlot create ::nx::Class::slot::mixin \ + -forwardername class-mixin -elementtype mixinreg + ::nx::RelationSlot create ::nx::Class::slot::filter \ + -forwardername class-filter -elementtype filterreg + + # + # Create two convenience object parameters to allow configuration + # of per-object mixins and filters for classes. + # + ::nx::ObjectParameterSlot create ::nx::Class::slot::object-mixin \ + -methodname "::nsf::classes::nx::Object::mixin" -elementtype mixinreg + ::nx::ObjectParameterSlot create ::nx::Class::slot::object-filter \ + -methodname "::nsf::classes::nx::Object::filter" -elementtype filterreg + + # + # Create object parameter slots for "noninit" and "volatile" + # + ::nx::ObjectParameterSlot create ::nx::Object::slot::noinit \ + -methodname ::nsf::methods::object::noinit -noarg true + ::nx::ObjectParameterSlot create ::nx::Object::slot::volatile -noarg true + + # + # Define "class" as a ObjectParameterSlot defined as alias + # + ::nx::ObjectParameterSlot create ::nx::Object::slot::class \ + -methodname "::nsf::methods::object::class" -elementtype class + + # + # Define "superclass" as a ObjectParameterSlot defined as alias + # + ::nx::ObjectParameterSlot create ::nx::Class::slot::superclass \ + -methodname "::nsf::methods::class::superclass" \ + -elementtype class \ + -multiplicity 1..n \ + -default ::nx::Object + + # + # Define the initcmd as a positional ObjectParameterSlot + # + # ::nx::ObjectParameterSlot create ::nx::Object::slot::__init \ + # -disposition alias \ + # -methodname "init" \ + # -noarg true \ + # -positional true \ + # -position 1 + + # + # Define the initcmd as a positional ObjectParameterSlot + # + ::nx::ObjectParameterSlot create ::nx::Object::slot::__initcmd \ + -disposition initcmd \ + -noleadingdash true \ + -positional true \ + -position 2 + + # + # Make sure the invalidate all ObjectParameterSlots + # + ::nsf::invalidateobjectparameter ::nx::ObjectParameterSlot + + # + # Define method "guard" for mixin- and filter-slots of Object and Class + # + ::nx::Object::slot::filter method guard {obj prop filter guard:optional} { + if {[info exists guard]} { + ::nsf::directdispatch $obj ::nsf::methods::object::filterguard $filter $guard + } else { + $obj info filter guard $filter } - ${os}::Class::slot::filter method guard {obj prop filter guard:optional} { - if {[info exists guard]} { - ::nsf::directdispatch $obj ::nsf::methods::class::filterguard $filter $guard - } else { - $obj info filter guard $filter - } + } + ::nx::Class::slot::filter method guard {obj prop filter guard:optional} { + if {[info exists guard]} { + ::nsf::directdispatch $obj ::nsf::methods::class::filterguard $filter $guard + } else { + $obj info filter guard $filter } - ${os}::Object::slot::mixin method guard {obj prop mixin guard:optional} { - if {[info exists guard]} { - ::nsf::directdispatch $obj ::nsf::methods::object::mixinguard $mixin $guard - } else { - $obj info mixin guard $mixin - } + } + ::nx::Object::slot::mixin method guard {obj prop mixin guard:optional} { + if {[info exists guard]} { + ::nsf::directdispatch $obj ::nsf::methods::object::mixinguard $mixin $guard + } else { + $obj info mixin guard $mixin } - ${os}::Class::slot::mixin method guard {obj prop filter guard:optional} { - if {[info exists guard]} { - ::nsf::directdispatch $obj ::nsf::methods::class::mixinguard $filter $guard - } else { - $obj info mixin guard $filter - } + } + ::nx::Class::slot::mixin method guard {obj prop filter guard:optional} { + if {[info exists guard]} { + ::nsf::directdispatch $obj ::nsf::methods::class::mixinguard $filter $guard + } else { + $obj info mixin guard $filter } - #::nsf::method::alias ::nx::Class::slot::object-filter guard ${os}::Object::slot::filter::guard } - - - register_system_slots ::nx - - # remove helper proc - rename register_system_slots "" + #::nsf::method::alias ::nx::Class::slot::object-filter guard ::nx::Object::slot::filter::guard # # With a special purpose eval, we could avoid the need for Index: library/nx/pkgIndex.tcl =================================================================== diff -u -rde25b8ac2f22701d21fead84ccc5793f8f809705 -rbf8a6fa213583971dfe9eafabaaecd8166c4343d --- library/nx/pkgIndex.tcl (.../pkgIndex.tcl) (revision de25b8ac2f22701d21fead84ccc5793f8f809705) +++ library/nx/pkgIndex.tcl (.../pkgIndex.tcl) (revision bf8a6fa213583971dfe9eafabaaecd8166c4343d) @@ -8,4 +8,4 @@ # script is sourced, the variable $dir must contain the # full path name of this file's directory. -package ifneeded nx 2.0a1 [list source [file join $dir nx.tcl]] +package ifneeded nx 2.0b1 [list source [file join $dir nx.tcl]] Index: library/xotcl/library/pkgIndex.tcl =================================================================== diff -u -r622880fd54236d56d371bd5726e7abcbef47a74a -rbf8a6fa213583971dfe9eafabaaecd8166c4343d --- library/xotcl/library/pkgIndex.tcl (.../pkgIndex.tcl) (revision 622880fd54236d56d371bd5726e7abcbef47a74a) +++ library/xotcl/library/pkgIndex.tcl (.../pkgIndex.tcl) (revision bf8a6fa213583971dfe9eafabaaecd8166c4343d) @@ -8,4 +8,4 @@ # script is sourced, the variable $dir must contain the # full path name of this file's directory. -package ifneeded XOTcl 2.0a1 [list source [file join $dir xotcl2.tcl]] +package ifneeded XOTcl 2.0b1 [list source [file join $dir xotcl2.tcl]] Index: library/xotcl/library/xotcl2.tcl =================================================================== diff -u -rb37bf2deab94b6294509fa79bb7b922d6e8a5635 -rbf8a6fa213583971dfe9eafabaaecd8166c4343d --- library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision b37bf2deab94b6294509fa79bb7b922d6e8a5635) +++ library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision bf8a6fa213583971dfe9eafabaaecd8166c4343d) @@ -1,4 +1,4 @@ -package provide XOTcl 2.0a1 +package provide XOTcl 2.0b1 package require nx ####################################################### @@ -396,8 +396,6 @@ ::nsf::var::set $slotContainer __parameter $arglist } - - # We provide a default value for superclass (when no superclass is # specified explicitely) and metaclass, in case they should differ # from the root classes of the object system. @@ -410,27 +408,24 @@ ############################################ # Register system slots ############################################ - proc register_system_slots {os} { - # We need explicit ::xotcl prefixes, since they are always skipped - # if not specified - set cSlotContainer [::nx::slotObj ${os}::Class] - set oSlotContainer [::nx::slotObj ${os}::Object] - ::nx::RelationSlot create ${cSlotContainer}::superclass - ::nsf::method::alias ${cSlotContainer}::superclass assign ::nsf::relation - ::nx::RelationSlot create ${oSlotContainer}::class -elementtype class -multiplicity 1..1 - ::nsf::method::alias ${oSlotContainer}::class assign ::nsf::relation - ::nx::RelationSlot create ${oSlotContainer}::mixin -forwardername object-mixin \ - -elementtype mixinreg -multiplicity 0..n - ::nx::RelationSlot create ${oSlotContainer}::filter -forwardername object-filter \ + + # We need fully qualified "::xotcl" prefixes, since prefix + # completion would skip the object system root namespace + + set cSlotContainer [::nx::slotObj ::xotcl::Class] + set oSlotContainer [::nx::slotObj ::xotcl::Object] + ::nx::RelationSlot create ${cSlotContainer}::superclass + ::nsf::method::alias ${cSlotContainer}::superclass assign ::nsf::relation + ::nx::RelationSlot create ${oSlotContainer}::class -elementtype class -multiplicity 1..1 + ::nsf::method::alias ${oSlotContainer}::class assign ::nsf::relation + ::nx::RelationSlot create ${oSlotContainer}::mixin -forwardername object-mixin \ + -elementtype mixinreg -multiplicity 0..n + ::nx::RelationSlot create ${oSlotContainer}::filter -forwardername object-filter \ + -elementtype filterreg -multiplicity 0..n + ::nx::RelationSlot create ${cSlotContainer}::instmixin -forwardername class-mixin \ + -elementtype mixinreg -multiplicity 0..n + ::nx::RelationSlot create ${cSlotContainer}::instfilter -forwardername class-filter \ -elementtype filterreg -multiplicity 0..n - ::nx::RelationSlot create ${cSlotContainer}::instmixin -forwardername class-mixin \ - -elementtype mixinreg -multiplicity 0..n - ::nx::RelationSlot create ${cSlotContainer}::instfilter -forwardername class-filter \ - -elementtype filterreg -multiplicity 0..n - } - register_system_slots ::xotcl - # remove temporary proc - rename register_system_slots "" ######################## # Info definition