Index: TODO =================================================================== diff -u -r0a38046eb4aac6c36ac7c72dc8b0fe6da43f7c6e -rf671281a240219965d436e2bfa762baf85274ca6 --- TODO (.../TODO) (revision 0a38046eb4aac6c36ac7c72dc8b0fe6da43f7c6e) +++ TODO (.../TODO) (revision f671281a240219965d436e2bfa762baf85274ca6) @@ -5119,14 +5119,14 @@ nx.tcl: - added flag -nocomplain to "/obj/ /prop/ unset ?-nocomplain?" +- use "mixin|filter clear" instead of "mixin|filter unset" +- name parameter option "slotset" instead of "slotassign" + ======================================================================== TODO: -- TODO: rename "slotassign" to "slotset"? - TODO: update tutorial and migration guide -- why is there no pos/index arg for mixin|filter delete? - - finish nx-property reform (merge into master) - check deactivated tests in tests/serialize.test Index: generic/nsf.c =================================================================== diff -u -r3cbf24ff95e38976cdc905ec0e8014d9d754ad6f -rf671281a240219965d436e2bfa762baf85274ca6 --- generic/nsf.c (.../nsf.c) (revision 3cbf24ff95e38976cdc905ec0e8014d9d754ad6f) +++ generic/nsf.c (.../nsf.c) (revision f671281a240219965d436e2bfa762baf85274ca6) @@ -14409,11 +14409,11 @@ } paramPtr->flags |= NSF_ARG_FORWARD; - } else if (strncmp(option, "slotassign", 10) == 0) { + } else if (strncmp(option, "slotset", 7) == 0) { if (unlikely(paramPtr->slotObj == NULL)) { - return NsfPrintError(interp, "parameter option 'slotassign' must follow 'slot='"); + return NsfPrintError(interp, "parameter option 'slotset' must follow 'slot='"); } - paramPtr->flags |= NSF_ARG_SLOTASSIGN; + paramPtr->flags |= NSF_ARG_SLOTSET; } else if (strncmp(option, "slotinitialize", 14) == 0) { if (unlikely(paramPtr->slotObj == NULL)) { @@ -14548,9 +14548,9 @@ INCR_REF_COUNT(paramPtr->slotObj); } else if (optionLength >= 6 && strncmp(option, "method=", 7) == 0) { - if ((paramPtr->flags & (NSF_ARG_ALIAS|NSF_ARG_FORWARD|NSF_ARG_SLOTASSIGN)) == 0) { + if ((paramPtr->flags & (NSF_ARG_ALIAS|NSF_ARG_FORWARD|NSF_ARG_SLOTSET)) == 0) { return NsfPrintError(interp, "parameter option 'method=' only allowed for parameter " - "types 'alias', 'forward' and 'slotassign'"); + "types 'alias', 'forward' and 'slotset'"); } if (paramPtr->method) {DECR_REF_COUNT(paramPtr->method);} paramPtr->method = Tcl_NewStringObj(option + 7, optionLength - 7); @@ -26667,7 +26667,7 @@ * is typically a forwarder to the slot object. */ - if (paramPtr->flags & NSF_ARG_SLOTASSIGN) { + if (paramPtr->flags & NSF_ARG_SLOTSET) { NsfObject *slotObject = GetSlotObject(interp, paramPtr->slotObj); if (likely(slotObject != NULL)) { Index: generic/nsf.h =================================================================== diff -u -r85ee1fdb043ed3f82fd272cc004c476c40861fdb -rf671281a240219965d436e2bfa762baf85274ca6 --- generic/nsf.h (.../nsf.h) (revision 85ee1fdb043ed3f82fd272cc004c476c40861fdb) +++ generic/nsf.h (.../nsf.h) (revision f671281a240219965d436e2bfa762baf85274ca6) @@ -341,7 +341,7 @@ #define NSF_ARG_UNNAMED 0x00100000 #define NSF_ARG_IS_RETURNVALUE 0x00200000 #define NSF_ARG_NOLEADINGDASH 0x00400000 -#define NSF_ARG_SLOTASSIGN 0x00800000 +#define NSF_ARG_SLOTSET 0x00800000 #define NSF_ARG_SLOTINITIALIZE 0x01000000 #undef __GNUC_PREREQ Index: generic/nsfInt.h =================================================================== diff -u -r242d5780b82de4363cd774a29ff7296270cdf0d0 -rf671281a240219965d436e2bfa762baf85274ca6 --- generic/nsfInt.h (.../nsfInt.h) (revision 242d5780b82de4363cd774a29ff7296270cdf0d0) +++ generic/nsfInt.h (.../nsfInt.h) (revision f671281a240219965d436e2bfa762baf85274ca6) @@ -439,11 +439,11 @@ #define NSF_ARG_METHOD_CALL (NSF_ARG_ALIAS|NSF_ARG_FORWARD) /* Disallowed parameter options */ -#define NSF_DISALLOWED_ARG_METHOD_PARAMETER (NSF_ARG_METHOD_INVOCATION|NSF_ARG_NOCONFIG|NSF_ARG_SLOTASSIGN|NSF_ARG_SLOTINITIALIZE) +#define NSF_DISALLOWED_ARG_METHOD_PARAMETER (NSF_ARG_METHOD_INVOCATION|NSF_ARG_NOCONFIG|NSF_ARG_SLOTSET|NSF_ARG_SLOTINITIALIZE) #define NSF_DISALLOWED_ARG_SETTER (NSF_ARG_SWITCH|NSF_ARG_SUBST_DEFAULT|NSF_DISALLOWED_ARG_METHOD_PARAMETER) /*#define NSF_DISALLOWED_ARG_OBJECT_PARAMETER (NSF_ARG_SWITCH)*/ #define NSF_DISALLOWED_ARG_OBJECT_PARAMETER 0 -#define NSF_DISALLOWED_ARG_VALUECHECK (NSF_ARG_SUBST_DEFAULT|NSF_ARG_METHOD_INVOCATION|NSF_ARG_SWITCH|NSF_ARG_CURRENTLY_UNKNOWN|NSF_ARG_SLOTASSIGN|NSF_ARG_SLOTINITIALIZE) +#define NSF_DISALLOWED_ARG_VALUECHECK (NSF_ARG_SUBST_DEFAULT|NSF_ARG_METHOD_INVOCATION|NSF_ARG_SWITCH|NSF_ARG_CURRENTLY_UNKNOWN|NSF_ARG_SLOTSET|NSF_ARG_SLOTINITIALIZE) /* flags for ParseContext */ #define NSF_PC_MUST_DECR 0x0001 Index: library/nx/nx.tcl =================================================================== diff -u -rae7d7d03bf76d21dd52d45181c3ab310e51845ec -rf671281a240219965d436e2bfa762baf85274ca6 --- library/nx/nx.tcl (.../nx.tcl) (revision ae7d7d03bf76d21dd52d45181c3ab310e51845ec) +++ library/nx/nx.tcl (.../nx.tcl) (revision f671281a240219965d436e2bfa762baf85274ca6) @@ -1361,7 +1361,7 @@ lappend options ${:elementtype} #puts stderr "+++ [self] added elementtype ${:elementtype}" } - if {${:disposition} eq "slotassign"} { + if {${:disposition} eq "slotset"} { lappend options slot=[::nsf::self] ${:disposition} method=${:forwardername} } else { lappend options ${:disposition} @@ -1376,15 +1376,11 @@ } if {$forObjectParameter} { # - # Slot objects are always in nx (for nx and for xotcl - # application objects. we have to watch for assign and set) + # Check, if get or set methods were overloaded # - if {[:info lookup method value=assign] ni {"" "::nsf::classes::xotcl::RelationSlot::value=assign"}} { - # In case the "assign" method was provided on the slot, ask nsf to call it directly - lappend options slot=[::nsf::self] slotassign - } elseif {[:info lookup method value=set] ni {"" "::nsf::classes::nx::RelationSlot::value=set"}} { + if {[:info lookup method value=set] ni {"" "::nsf::classes::nx::RelationSlot::value=set"}} { # In case the "set" method was provided on the slot, ask nsf to call it directly - lappend options slot=[::nsf::self] slotassign + lappend options slot=[::nsf::self] slotset } elseif {[:info lookup method value=get] ni {"" "::nsf::classes::nx::RelationSlot::value=get"}} { # In case the "get" method was provided on the slot, ask nsf to call it directly lappend options slot=[::nsf::self] @@ -1517,7 +1513,7 @@ } # - # create methods for slot operations assign/get/add/delete + # create methods for slot operations set/get/add/clear/delete # ::nsf::method::alias RelationSlot value=set ::nsf::relation::set ::nsf::method::alias RelationSlot value=get ::nsf::relation::get @@ -1617,25 +1613,25 @@ ::nx::RelationSlot create ::nx::Object::slot::object-mixin \ -multiplicity 0..n \ -defaultmethods {} \ - -disposition slotassign \ + -disposition slotset \ -settername "object mixin" -forwardername object-mixin -elementtype mixinreg ::nx::RelationSlot create ::nx::Object::slot::object-filter \ -multiplicity 0..n \ -defaultmethods {} \ - -disposition slotassign \ + -disposition slotset \ -settername "object filter" -forwardername object-filter -elementtype filterreg ::nx::RelationSlot create ::nx::Class::slot::mixin \ -multiplicity 0..n \ -defaultmethods {} \ - -disposition slotassign \ + -disposition slotset \ -forwardername "class-mixin" -elementtype mixinreg ::nx::RelationSlot create ::nx::Class::slot::filter \ -multiplicity 0..n \ -defaultmethods {} \ - -disposition slotassign \ + -disposition slotset \ -forwardername class-filter -elementtype filterreg # @@ -1753,7 +1749,7 @@ ::nx::VariableSlot protected method setterRedefinedOptions {} { if {[:info lookup method value=set] ne "::nsf::classes::nx::VariableSlot::value=set"} { # In case the "set" method was provided on the slot, ask nsf to call it directly - return [list slot=[::nsf::self] slotassign] + return [list slot=[::nsf::self] slotset] } if {[:info lookup method value=get] ne "::nsf::classes::nx::VariableSlot::value=get"} { # In case the "get" method was provided on the slot, ask nsf to call it directly @@ -2034,7 +2030,7 @@ ###################################################################### # Implementation of (incremental) forwarder operations for # VariableSlots: - # - assign + # - set # - get # - add # - delete Index: library/xotcl/library/xotcl2.tcl =================================================================== diff -u -r3cbf24ff95e38976cdc905ec0e8014d9d754ad6f -rf671281a240219965d436e2bfa762baf85274ca6 --- library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision 3cbf24ff95e38976cdc905ec0e8014d9d754ad6f) +++ library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision f671281a240219965d436e2bfa762baf85274ca6) @@ -1069,7 +1069,7 @@ :protected method setterRedefinedOptions {} { if {[:info lookup method value=set] ne "::nsf::classes::xotcl::Attribute::value=set"} { # In case the "set" method was provided on the slot, ask nsf to call it directly - return [list slot=[::nsf::self] slotassign] + return [list slot=[::nsf::self] slotset] } if {[:info lookup method value=get] ne "::nsf::classes::nx::VariableSlot::value=get"} { # In case the "get" method was provided on the slot, ask nsf to call it directly Index: tests/disposition.test =================================================================== diff -u -r5d3bc04b5ec0a4422236a65220d94ceee17a8796 -rf671281a240219965d436e2bfa762baf85274ca6 --- tests/disposition.test (.../disposition.test) (revision 5d3bc04b5ec0a4422236a65220d94ceee17a8796) +++ tests/disposition.test (.../disposition.test) (revision f671281a240219965d436e2bfa762baf85274ca6) @@ -303,7 +303,7 @@ # The option 'method=...' applies to disposition types only # C setObjectParams [list [list -foo:initcmd,method=BOOM]] - ? {C new} "parameter option 'method=' only allowed for parameter types 'alias', 'forward' and 'slotassign'" + ? {C new} "parameter option 'method=' only allowed for parameter types 'alias', 'forward' and 'slotset'" C setObjectParams [list [list -foo:alias,forward]] ? {C new} "parameter option 'forward' not valid in this option combination" Index: tests/info-method.test =================================================================== diff -u -rdd169437c7a701da0063a40978614e6148d71221 -rf671281a240219965d436e2bfa762baf85274ca6 --- tests/info-method.test (.../info-method.test) (revision dd169437c7a701da0063a40978614e6148d71221) +++ tests/info-method.test (.../info-method.test) (revision f671281a240219965d436e2bfa762baf85274ca6) @@ -721,7 +721,7 @@ ? {C info configure syntax} "/::C/ ?-a /value/? ?-b /value/? ?-object-mixin /mixinreg .../? ?-class /class/? ?-object-filter /filterreg .../? ?/__initblock/?" # ? {C info configure syntax a} "/::C/ ?-a /value/?" - ? {C info configure parameters } "-a {-b 1} -object-mixin:mixinreg,slot=::nx::Object::slot::object-mixin,slotassign,method=object-mixin,0..n -class:class,alias,method=::nsf::methods::object::class -object-filter:filterreg,slot=::nx::Object::slot::object-filter,slotassign,method=object-filter,0..n __initblock:cmd,optional,noleadingdash" + ? {C info configure parameters } "-a {-b 1} -object-mixin:mixinreg,slot=::nx::Object::slot::object-mixin,slotset,method=object-mixin,0..n -class:class,alias,method=::nsf::methods::object::class -object-filter:filterreg,slot=::nx::Object::slot::object-filter,slotset,method=object-filter,0..n __initblock:cmd,optional,noleadingdash" # ? {C info parameter list} "-a -b -noinit -object-mixin -class -object-filter __initblock" # ? {C info parameter names} "a b noinit object-mixin class object-filter __initblock" Index: tests/info-variable.test =================================================================== diff -u -ra615b76dd389290567bc8506fec6fa0a3b2c14d2 -rf671281a240219965d436e2bfa762baf85274ca6 --- tests/info-variable.test (.../info-variable.test) (revision a615b76dd389290567bc8506fec6fa0a3b2c14d2) +++ tests/info-variable.test (.../info-variable.test) (revision f671281a240219965d436e2bfa762baf85274ca6) @@ -33,9 +33,9 @@ ? {join [Person info configure parameters] \n} \ "-age:integer -name --object-mixin:mixinreg,slot=::nx::Object::slot::object-mixin,slotassign,method=object-mixin,0..n +-object-mixin:mixinreg,slot=::nx::Object::slot::object-mixin,slotset,method=object-mixin,0..n -class:class,alias,method=::nsf::methods::object::class --object-filter:filterreg,slot=::nx::Object::slot::object-filter,slotassign,method=object-filter,0..n +-object-filter:filterreg,slot=::nx::Object::slot::object-filter,slotset,method=object-filter,0..n __initblock:cmd,optional,noleadingdash" ? {Person info configure parameters age} "-age:integer" Index: tests/parameters.test =================================================================== diff -u -r3cbf24ff95e38976cdc905ec0e8014d9d754ad6f -rf671281a240219965d436e2bfa762baf85274ca6 --- tests/parameters.test (.../parameters.test) (revision 3cbf24ff95e38976cdc905ec0e8014d9d754ad6f) +++ tests/parameters.test (.../parameters.test) (revision f671281a240219965d436e2bfa762baf85274ca6) @@ -4,10 +4,10 @@ #::nx::configure defaultMethodCallProtection false -set objectFilter "-object-filter:filterreg,slot=::nx::Object::slot::object-filter,slotassign,method=object-filter,0..n" -set objectMixin "-object-mixin:mixinreg,slot=::nx::Object::slot::object-mixin,slotassign,method=object-mixin,0..n" +set objectFilter "-object-filter:filterreg,slot=::nx::Object::slot::object-filter,slotset,method=object-filter,0..n" +set objectMixin "-object-mixin:mixinreg,slot=::nx::Object::slot::object-mixin,slotset,method=object-mixin,0..n" set initBlock "__initblock:cmd,optional,noleadingdash" -set filter "-filter:filterreg,slot=::nx::Class::slot::filter,slotassign,method=class-filter,0..n" +set filter "-filter:filterreg,slot=::nx::Class::slot::filter,slotset,method=class-filter,0..n" set ::trailer "$objectMixin -class:class,alias,method=::nsf::methods::object::class $objectFilter $initBlock" @@ -283,7 +283,7 @@ C create c1 ? {C eval :__objectparameter} \ - "{-superclass:class,alias,method=::nsf::methods::class::superclass,1..n ::nx::Object} -mixin:mixinreg,slot=::nx::Class::slot::mixin,slotassign,method=class-mixin,0..n $::filter $::objectMixin -class:class,alias,method=::nsf::methods::object::class $::objectFilter $::initBlock" + "{-superclass:class,alias,method=::nsf::methods::class::superclass,1..n ::nx::Object} -mixin:mixinreg,slot=::nx::Class::slot::mixin,slotset,method=class-mixin,0..n $::filter $::objectMixin -class:class,alias,method=::nsf::methods::object::class $::objectFilter $::initBlock" #### TOOD: remove or add #? {c1 eval :__objectparameter} \ @@ -2819,7 +2819,7 @@ # to ::nsf::is which (currently) does not accept it: # # 'invalid value constraints - # "slot=::objekt::per-object-slot::a,slotassign"' + # "slot=::objekt::per-object-slot::a,slotset"' # nx::Object create o ? {o eval {info exists :a}} 0 Index: tests/rac.test =================================================================== diff -u -r4bc60e16c10fdbbb640b3019d4bdebdc469fdf55 -rf671281a240219965d436e2bfa762baf85274ca6 --- tests/rac.test (.../rac.test) (revision 4bc60e16c10fdbbb640b3019d4bdebdc469fdf55) +++ tests/rac.test (.../rac.test) (revision f671281a240219965d436e2bfa762baf85274ca6) @@ -29,7 +29,7 @@ # # TODO: This should not be ::nx::VariableSlot below, but -# ::nx::ObjectParameterSlot mixes alias + slotassign. +# ::nx::ObjectParameterSlot mixes alias + slotset. # ::nx::VariableSlot create ::nx::Object::slot::object-invariant {