Index: doc/example-scripts/traits-composite.tcl =================================================================== diff -u -racc540eae81024718461724ce69e7971fa9ddfa9 -rdd169437c7a701da0063a40978614e6148d71221 --- doc/example-scripts/traits-composite.tcl (.../traits-composite.tcl) (revision acc540eae81024718461724ce69e7971fa9ddfa9) +++ doc/example-scripts/traits-composite.tcl (.../traits-composite.tcl) (revision dd169437c7a701da0063a40978614e6148d71221) @@ -31,8 +31,8 @@ # from the base class or other traits. The definition is incomplete # in these regards - :requiredMethods assign position - :requiredVariables assign collection + :requiredMethods set position + :requiredVariables set collection } # @@ -53,7 +53,7 @@ } # This trait requires these methods: - :requiredMethods assign {setToStart atEnd nextPosition} + :requiredMethods set {setToStart atEnd nextPosition} # Require the trait "tPositionableStream" :require trait tPositionableStream @@ -75,7 +75,7 @@ } # This trait requires these methods: - :requiredMethods assign {setToEnd nextPosition} + :requiredMethods set {setToEnd nextPosition} # Require the trait "tPositionableStream" :require trait tPositionableStream Index: doc/example-scripts/traits-simple.tcl =================================================================== diff -u -racc540eae81024718461724ce69e7971fa9ddfa9 -rdd169437c7a701da0063a40978614e6148d71221 --- doc/example-scripts/traits-simple.tcl (.../traits-simple.tcl) (revision acc540eae81024718461724ce69e7971fa9ddfa9) +++ doc/example-scripts/traits-simple.tcl (.../traits-simple.tcl) (revision dd169437c7a701da0063a40978614e6148d71221) @@ -40,8 +40,8 @@ # "collection" from the base class. The definition is incomplete in # these regards. - :requiredMethods assign position - :requiredVariables assign collection + :requiredMethods set position + :requiredVariables set collection } # Define the class +ReadStream+ with properties +position+ and Index: library/lib/nx-volatile.tcl =================================================================== diff -u -r97f38e2c570572b797547e361d8c6dd0aef3ed66 -rdd169437c7a701da0063a40978614e6148d71221 --- library/lib/nx-volatile.tcl (.../nx-volatile.tcl) (revision 97f38e2c570572b797547e361d8c6dd0aef3ed66) +++ library/lib/nx-volatile.tcl (.../nx-volatile.tcl) (revision dd169437c7a701da0063a40978614e6148d71221) @@ -8,10 +8,10 @@ ::nx::ObjectParameterSlot create ::nx::Object::slot::volatile -noarg true - ::nsf::method::create ::nx::Object::slot::volatile assign {object var value} { + ::nsf::method::create ::nx::Object::slot::volatile value=set {object var value} { $object ::nsf::methods::object::volatile } - ::nsf::method::create ::nx::Object::slot::volatile get {object var} { + ::nsf::method::create ::nx::Object::slot::volatile value=get {object var} { ::nsf::object::property $object volatile } Index: library/nx/nx.tcl =================================================================== diff -u -rc52c4d07b0c6921e5a94baa31e905ae21241eb25 -rdd169437c7a701da0063a40978614e6148d71221 --- library/nx/nx.tcl (.../nx.tcl) (revision c52c4d07b0c6921e5a94baa31e905ae21241eb25) +++ library/nx/nx.tcl (.../nx.tcl) (revision dd169437c7a701da0063a40978614e6148d71221) @@ -1323,6 +1323,7 @@ ::nsf::method::forward $domain \ -per-object=${:per-object} \ $name \ + -prefix "value=" \ -onerror [list ${:manager} onError] \ ${:manager} \ [expr {$dm ne "" ? [list %1 $dm] : "%1"}] %self \ @@ -1386,13 +1387,13 @@ # Slot objects are always in nx (for nx and for xotcl # application objects. we have to watch for assign and set) # - if {[:info lookup method assign] ni {"" "::nsf::classes::nx::RelationSlot::assign"}} { + if {[:info lookup method value=assign] ni {"" "::nsf::classes::nx::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 set] ni {"" "::nsf::classes::nx::RelationSlot::set"}} { + } elseif {[: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 - } elseif {[:info lookup method get] ni {"" "::nsf::classes::nx::RelationSlot::get"}} { + } 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] } @@ -1526,9 +1527,9 @@ # # create methods for slot operations assign/get/add/delete # - ::nsf::method::alias RelationSlot assign ::nsf::relation - ::nsf::method::alias RelationSlot set ::nsf::relation - ::nsf::method::alias RelationSlot get ::nsf::relation + ::nsf::method::alias RelationSlot value=assign ::nsf::relation + ::nsf::method::alias RelationSlot value=set ::nsf::relation + ::nsf::method::alias RelationSlot value=get ::nsf::relation RelationSlot protected method delete_value {obj prop old value} { # @@ -1587,11 +1588,11 @@ } } - RelationSlot public method get {obj prop} { - ::nsf::relation $obj $prop - } + #RelationSlot public method value=get {obj prop} { + # ::nsf::relation $obj $prop + #} - RelationSlot public method add {obj prop value {pos 0}} { + RelationSlot public method value=add {obj prop value {pos 0}} { set oldSetting [::nsf::relation $obj $prop] #puts stderr [list ::nsf::relation $obj $prop [linsert $oldSetting $pos $value]] # @@ -1600,7 +1601,7 @@ uplevel [list ::nsf::relation $obj $prop [linsert $oldSetting $pos $value]] } - RelationSlot public method delete {-nocomplain:switch obj prop value} { + RelationSlot public method value=delete {-nocomplain:switch obj prop value} { uplevel [list ::nsf::relation $obj $prop \ [:delete_value $obj $prop [::nsf::relation $obj $prop] $value]] } @@ -1719,28 +1720,28 @@ # # Define method "guard" for mixin- and filter-slots of Object and Class # - ::nx::Object::slot::object-filter object method guard {obj prop filter guard:optional} { + ::nx::Object::slot::object-filter object method value=guard {obj prop filter guard:optional} { if {[info exists guard]} { ::nsf::directdispatch $obj ::nsf::methods::object::filterguard $filter $guard } else { $obj info object filter guard $filter } } - ::nx::Class::slot::filter object method guard {obj prop filter guard:optional} { + ::nx::Class::slot::filter object method value=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::Object::slot::object-mixin object method guard {obj prop mixin guard:optional} { + ::nx::Object::slot::object-mixin object method value=guard {obj prop mixin guard:optional} { if {[info exists guard]} { ::nsf::directdispatch $obj ::nsf::methods::object::mixinguard $mixin $guard } else { $obj info object mixin guard $mixin } } - ::nx::Class::slot::mixin object method guard {obj prop filter guard:optional} { + ::nx::Class::slot::mixin object method value=guard {obj prop filter guard:optional} { if {[info exists guard]} { ::nsf::directdispatch $obj ::nsf::methods::class::mixinguard $filter $guard } else { @@ -1800,11 +1801,11 @@ } ::nx::VariableSlot protected method setterRedefinedOptions {} { - if {[:info lookup method set] ne "::nsf::classes::nx::VariableSlot::set"} { + 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] } - if {[:info lookup method get] ne "::nsf::classes::nx::VariableSlot::get"} { + 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 return [list slot=[::nsf::self]] } @@ -1816,6 +1817,7 @@ } { set options "" set slotObject "" + if {[info exists :type]} { set type ${:type} if {$type eq "switch" && !$forObjectParameter} {set type boolean} @@ -1985,12 +1987,14 @@ # jet. We need the methods as well for e.g. private properties, # where the setting of the property is handled via slot. # - if {[:info lookup method set] eq "::nsf::classes::nx::VariableSlot::set"} { - :public object method set [list obj var [:namedParameterSpec {} value $options]] {::nsf::var::set $obj $var $value} + if {[:info lookup method value=set] eq "::nsf::classes::nx::VariableSlot::value=set"} { + set args [list obj var [:namedParameterSpec {} value $options]] + :public object method value=set $args {::nsf::var::set $obj $var $value} } - if {[:isMultivalued] && [:info lookup method add] eq "::nsf::classes::nx::VariableSlot::add"} { + if {[:isMultivalued] && [:info lookup method value=add] eq "::nsf::classes::nx::VariableSlot::value=add"} { lappend options_single slot=[::nsf::self] - :public object method add [list obj prop [:namedParameterSpec {} value $options_single] {pos 0}] {::nsf::next} + set args [list obj prop [:namedParameterSpec {} value $options_single] {pos 0}] + :public object method value=add $args {::nsf::next} } else { # TODO should we deactivate add/delete? } @@ -2098,11 +2102,10 @@ # - delete ###################################################################### - ::nsf::method::alias ::nx::VariableSlot get ::nsf::var::set - ::nsf::method::alias ::nx::VariableSlot assign ::nsf::var::set - ::nsf::method::alias ::nx::VariableSlot set ::nsf::var::set + ::nsf::method::alias ::nx::VariableSlot value=get ::nsf::var::set + ::nsf::method::alias ::nx::VariableSlot value=set ::nsf::var::set - ::nx::VariableSlot public method add {obj prop value {pos 0}} { + ::nx::VariableSlot public method value=add {obj prop value {pos 0}} { if {![:isMultivalued]} { #puts stderr "... vars [[self] info vars] // [[self] eval {set :multiplicity}]" return -code error "property $prop of [set :domain] ist not multivalued" @@ -2114,7 +2117,7 @@ } } - ::nx::VariableSlot public method delete {-nocomplain:switch obj prop value} { + ::nx::VariableSlot public method value=delete {-nocomplain:switch obj prop value} { set old [::nsf::var::set $obj $prop] set p [lsearch -glob $old $value] if {$p>-1} {::nsf::var::set $obj $prop [lreplace $old $p $p]} else { @@ -2399,14 +2402,15 @@ # of "new" # set errorOccured [catch [list ::apply [list {} $cmds $object]] errorMsg] + # # Remove the mapped "new" method, if it was added above # if {$nxMapNew} {::nsf::method::alias ::nx::Class new $plainNew} if {[::nsf::is class ::xotcl::Class]} { if {$xotclMapNew} {::nsf::method::alias ::xotcl::Class new $plainNew} } - if {$errorOccured} {error $errorMsg} + if {$errorOccured} {return -code error $errorMsg} } else { ::apply [list {} $cmds $object] Index: library/serialize/serializer.tcl =================================================================== diff -u -r5e064669f84abe5aef0dcd07d76f6c033eeeb726 -rdd169437c7a701da0063a40978614e6148d71221 --- library/serialize/serializer.tcl (.../serializer.tcl) (revision 5e064669f84abe5aef0dcd07d76f6c033eeeb726) +++ library/serialize/serializer.tcl (.../serializer.tcl) (revision dd169437c7a701da0063a40978614e6148d71221) @@ -381,7 +381,7 @@ # don't filter anything during serialization set filterstate [::nsf::configure filter off] set s [:new -childof [::nsf::current object]] - if {[info exists ignoreVarsRE]} {$s ignoreVarsRE assign $ignoreVarsRE} + if {[info exists ignoreVarsRE]} {$s ignoreVarsRE set $ignoreVarsRE} if {[info exists ignore]} {$s ignore $ignore} set r [subst { @@ -467,7 +467,7 @@ :public object method deepSerialize {-ignoreVarsRE -ignore -map -objmap args} { :resetPattern set s [:new -childof [::nsf::current object]] - if {[info exists ignoreVarsRE]} {$s ignoreVarsRE assign $ignoreVarsRE} + if {[info exists ignoreVarsRE]} {$s ignoreVarsRE set $ignoreVarsRE} if {[info exists ignore]} {$s ignore $ignore} if {[info exists objmap]} {$s objmap $objmap} foreach o $args { Index: library/xotcl/library/xotcl2.tcl =================================================================== diff -u -rc52c4d07b0c6921e5a94baa31e905ae21241eb25 -rdd169437c7a701da0063a40978614e6148d71221 --- library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision c52c4d07b0c6921e5a94baa31e905ae21241eb25) +++ library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision dd169437c7a701da0063a40978614e6148d71221) @@ -65,8 +65,8 @@ -object.init init -object.move move -object.unknown unknown - -slot.set assign - -slot.get get + -slot.set value=assign + -slot.get value=get } # @@ -428,7 +428,7 @@ ::xotcl::Class instproc parameter {arglist} { set slotContainer [::nx::slotObj [::nsf::self]] foreach arg $arglist { - puts stderr "PARAMETER: [self] ::nsf::classes::nx::Class::property -accessor public $arg" + #puts stderr "PARAMETER: [self] ::nsf::classes::nx::Class::property -accessor public $arg" #[self] ::nsf::classes::nx::Class::property -accessor public $arg if {[llength $arg] > 1} { ::nx::MetaSlot createFromParameterSpec [::nsf::self] [lindex $arg 0] [lindex $arg 1] @@ -491,10 +491,10 @@ set oSlotContainer [::nx::slotObj ::xotcl::Object] ::nx::RelationSlot create ${cSlotContainer}::superclass \ -defaultmethods {get assign} - #::nsf::method::alias ${cSlotContainer}::superclass assign ::nsf::relation + #::nsf::method::alias ${cSlotContainer}::superclass value=assign ::nsf::relation ::nx::RelationSlot create ${oSlotContainer}::class -elementtype class -multiplicity 1..1 \ -defaultmethods {get assign} - #::nsf::method::alias ${oSlotContainer}::class assign ::nsf::relation + #::nsf::method::alias ${oSlotContainer}::class value=assign ::nsf::relation ::nx::RelationSlot create ${oSlotContainer}::mixin -forwardername object-mixin \ -defaultmethods {get assign} \ -elementtype mixinreg -multiplicity 0..n @@ -1049,28 +1049,30 @@ # ::xotcl::MetaSlot create ::xotcl::Attribute -superclass ::nx::VariableSlot { + :public alias value=assign ::nsf::var::set + #:property defaultmethods {get assign} :property -accessor public multivalued { # # The slot object is an nx object, therefore we need "set" # rather than "assign" # - :public object method set {object property value} { + :public object method value=set {object property value} { set mClass [expr {$value ? "0..n" : "1..1"}] $object configure -incremental $value -multiplicity $mClass } - :public object method get {object property} { + :public object method value=get {object property} { return [$object eval [list :isMultivalued]] } } :protected method setterRedefinedOptions {} { - if {[:info lookup method assign] ne "::nsf::classes::nx::VariableSlot::assign"} { + if {[:info lookup method value=assign] ne "::nsf::classes::xotcl::Attribute::value=assign"} { # In case the "assign" method was provided on the slot, ask nsf to call it directly return [list slot=[::nsf::self] slotassign] } - if {[:info lookup method get] ne "::nsf::classes::nx::VariableSlot::get"} { + 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 return [list slot=[::nsf::self]] } @@ -1082,12 +1084,14 @@ # jet. We need the methods as well for e.g. private properties, # where the setting of the property is handled via slot. # - if {[:info lookup method assign] eq "::nsf::classes::nx::VariableSlot::assign"} { - :public object method assign [list obj var [:namedParameterSpec {} value $options]] {::nsf::var::set $obj $var $value} + if {[:info lookup method value=assign] eq "::nsf::classes::xotcl::Attribute::value=assign"} { + set args [list obj var [:namedParameterSpec {} value $options]] + :public object method value=assign $args {::nsf::var::set $obj $var $value} } - if {[:isMultivalued] && [:info lookup method add] eq "::nsf::classes::nx::VariableSlot::add"} { + if {[:isMultivalued] && [:info lookup method value=add] eq "::nsf::classes::nx::VariableSlot::value=add"} { lappend options_single slot=[::nsf::self] - :public object method add [list obj prop [:namedParameterSpec {} value $options_single] {pos 0}] {::nsf::next} + set args [list obj prop [:namedParameterSpec {} value $options_single] {pos 0}] + :public object method value=add $args {::nsf::next} } else { # TODO should we deactivate add/delete? } @@ -1099,9 +1103,9 @@ # * "assign", "get" and "add" are still untouched, or # * or incremental is specified # - if {[:info lookup method assign] ne "::nsf::classes::nx::VariableSlot::assign"} {return 1} - if {[:info lookup method add] ne "::nsf::classes::nx::VariableSlot::add"} {return 1} - if {[:info lookup method get] ne "::nsf::classes::nx::VariableSlot::get"} {return 1} + if {[:info lookup method value=assign] ne "::nsf::classes::xotcl::Attribute::value=assign"} {return 1} + if {[:info lookup method value=add] ne "::nsf::classes::nx::VariableSlot::value=add"} {return 1} + if {[:info lookup method value=get] ne "::nsf::classes::nx::VariableSlot::value=get"} {return 1} if {[info exists :settername]} {return 1} if {!${:incremental}} {return 0} #if {![:isMultivalued]} {return 0} @@ -1113,6 +1117,7 @@ ::nsf::method::forward $domain \ -per-object=${:per-object} \ $name \ + -prefix value= \ ${:manager} \ "%1 {get assign}" %self \ ${:forwardername} Index: library/xotcl/tests/slottest.xotcl =================================================================== diff -u -r91007cd5fdd2f8f125fdd433ef7701574e8167d2 -rdd169437c7a701da0063a40978614e6148d71221 --- library/xotcl/tests/slottest.xotcl (.../slottest.xotcl) (revision 91007cd5fdd2f8f125fdd433ef7701574e8167d2) +++ library/xotcl/tests/slottest.xotcl (.../slottest.xotcl) (revision dd169437c7a701da0063a40978614e6148d71221) @@ -131,8 +131,8 @@ } } -? {O superclass slot self} "::xotcl::Class::slot::superclass" -#? {O superclass slot domain} "::xotcl::Class" +#? {O superclass slot self} "::xotcl::Class::slot::superclass" +? {O ::nsf::methods::object::info::lookupslots superclass} "::xotcl::Class::slot::superclass" ? {::xotcl::Class::slot::superclass cget -domain} "::xotcl::Class" ? {O2 superclass} "::O" @@ -377,7 +377,7 @@ ? {a0 procsearch f3} "::a0 proc f3" ? {a0 procsearch f4} "::a0 forward f4" ? {a0 procsearch set} "::xotcl::Object instcmd set" -? {A::slot::foo info lookup method assign} "::nsf::classes::nx::VariableSlot::assign" +? {A::slot::foo info lookup method value=assign} "::nsf::classes::xotcl::Attribute::value=assign" # redefine setter for foo of class A #A slot foo method assign {domain var val} ... @@ -546,7 +546,7 @@ nx::test case assign-via-slots Class create A -slots { - Attribute create foo -default 1 -proc assign {domain var value} { + Attribute create foo -default 1 -proc value=assign {domain var value} { if {$value < 0 || $value > 99} { error "$value is not in the range of 0 .. 99" } @@ -646,7 +646,7 @@ # Class create AA -slots { - Attribute foo -default 1 -proc assign {domain var value} { + Attribute foo -default 1 -proc value=assign {domain var value} { if {$value < 0 || $value > 99} { error "$value is not in the range of 0 .. 99" } Index: tests/alias.test =================================================================== diff -u -rc52c4d07b0c6921e5a94baa31e905ae21241eb25 -rdd169437c7a701da0063a40978614e6148d71221 --- tests/alias.test (.../alias.test) (revision c52c4d07b0c6921e5a94baa31e905ae21241eb25) +++ tests/alias.test (.../alias.test) (revision dd169437c7a701da0063a40978614e6148d71221) @@ -9,9 +9,9 @@ nx::test case alias-preliminaries { # The system methods of nx::VariableSlot are either alias or forwarders - ? {lsort [::nx::VariableSlot info methods -type alias]} {assign get set} - ? {::nx::VariableSlot info method definition get} \ - "::nx::VariableSlot public alias get ::nsf::var::set" + ? {lsort [::nx::VariableSlot info methods -type alias]} {value=get value=set} + ? {::nx::VariableSlot info method definition value=get} \ + "::nx::VariableSlot public alias value=get ::nsf::var::set" # define an alias and retrieve its definition set cmd "::nx::Object public alias set ::set" Index: tests/cget.test =================================================================== diff -u -rc52c4d07b0c6921e5a94baa31e905ae21241eb25 -rdd169437c7a701da0063a40978614e6148d71221 --- tests/cget.test (.../cget.test) (revision c52c4d07b0c6921e5a94baa31e905ae21241eb25) +++ tests/cget.test (.../cget.test) (revision dd169437c7a701da0063a40978614e6148d71221) @@ -58,7 +58,7 @@ # # The second test set checks redirection of configure / cget to slot -# methods "assign" and "get". +# methods "set" and "get". # nx::test configure -count 1 @@ -68,19 +68,19 @@ # Define a property with a "get" method :property bar1 { - :public object method get { object property} { + :public object method value=get { object property} { incr ::count(cget) nsf::var::set $object $property } } - # Define a property with a "get" and "assign" method + # Define a property with a "get" and "set" method :property bar2 { - :public object method get { object property} { + :public object method value=get { object property} { incr ::count(cget) nsf::var::set $object $property } - :public object method set { object property value } { + :public object method value=set { object property value } { incr ::count(assign) nsf::var::set $object $property $value } @@ -186,12 +186,12 @@ :property {friends:0..n ""} :property sex - # Define a property with a "get" and "assign" method + # Define a property with a "get" and "set" method :property bar { - :public object method get { object property } { + :public object method value=get { object property } { nsf::var::set $object $property } - :public object method set { object property value } { + :public object method value=set { object property value } { nsf::var::set $object $property $value } } @@ -216,7 +216,7 @@ # - built-in accessor # - configure # - configure via slot method - ? {p1 age assign 27} 27 + ? {p1 age set 27} 27 ? {p1 configure -age 27} "" ? {p1 configure -bar 102} "" Index: tests/info-method.test =================================================================== diff -u -ra615b76dd389290567bc8506fec6fa0a3b2c14d2 -rdd169437c7a701da0063a40978614e6148d71221 --- tests/info-method.test (.../info-method.test) (revision a615b76dd389290567bc8506fec6fa0a3b2c14d2) +++ tests/info-method.test (.../info-method.test) (revision dd169437c7a701da0063a40978614e6148d71221) @@ -119,8 +119,8 @@ ? {C info object method definition add1} "::C public object forward add1 expr 1 +" ? {C info object method definition fpo} "::C public object forward fpo ::o" - ? {C info method definition s} "::C public forward s ::C::slot::s %1 %self s" - ? {C info object method definition spo} "::C public object forward spo ::C::per-object-slot::spo %1 %self spo" + ? {C info method definition s} "::C public forward s -prefix value= ::C::slot::s %1 %self s" + ? {C info object method definition spo} "::C public object forward spo -prefix value= ::C::per-object-slot::spo %1 %self spo" ? {C info method definition a} "::C public alias a ::set" ? {C info object method definition apo} "::C public object alias apo ::puts" Index: tests/methods.test =================================================================== diff -u -rc52c4d07b0c6921e5a94baa31e905ae21241eb25 -rdd169437c7a701da0063a40978614e6148d71221 --- tests/methods.test (.../methods.test) (revision c52c4d07b0c6921e5a94baa31e905ae21241eb25) +++ tests/methods.test (.../methods.test) (revision dd169437c7a701da0063a40978614e6148d71221) @@ -66,10 +66,10 @@ } C property -accessor public s0 C property -accessor protected s1 -? {c1 s0 assign 0} 0 -? {::nsf::dispatch c1 s1 assign 1} 1 +? {c1 s0 set 0} 0 +? {::nsf::dispatch c1 s1 set 1} 1 C object property -accessor public {s3 ""} -? {C s3 assign 3} 3 +? {C s3 set 3} 3 # create a fresh object (different from c1) C create c2 @@ -93,9 +93,9 @@ nx::test case class-level-setter { ? {c2 plain_setter 1} {::c2: unable to dispatch method 'plain_setter'} #? {c2 plain_setter 1} 1 - ? {c2 public_setter assign 2} "2" - ? {catch {c2 protected_setter assign 3}} 1 - ? {::nsf::dispatch c2 protected_setter assign 4} "4" + ? {c2 public_setter set 2} "2" + ? {catch {c2 protected_setter set 3}} 1 + ? {::nsf::dispatch c2 protected_setter set 4} "4" } # class level alias .... @@ -128,9 +128,9 @@ nx::test case class-object-level-setter { ? {C plain_object_setter 1} {method 'plain_object_setter' unknown for ::C; consider '::C create plain_object_setter 1' instead of '::C plain_object_setter 1'} #? {C plain_object_setter 1} "1" - ? {C public_object_setter assign 2} "2" - ? {catch {C protected_object_setter assign 3}} 1 - ? {::nsf::dispatch C protected_object_setter assign 4} "4" + ? {C public_object_setter set 2} "2" + ? {catch {C protected_object_setter set 3}} 1 + ? {::nsf::dispatch C protected_object_setter set 4} "4" } # class level alias .... @@ -163,9 +163,9 @@ nx::test case object-level-setter { ? {c1 plain_object_setter 1} {::c1: unable to dispatch method 'plain_object_setter'} #? {c1 plain_object_setter 1} "1" - ? {c1 public_object_setter assign 2} "2" - ? {catch {c1 protected_object_setter assign 3}} 1 - ? {::nsf::dispatch c1 protected_object_setter assign 4} "4" + ? {c1 public_object_setter set 2} "2" + ? {catch {c1 protected_object_setter set 3}} 1 + ? {::nsf::dispatch c1 protected_object_setter set 4} "4" } # object level alias .... @@ -308,7 +308,7 @@ ? {c1 cget -c} c1 ? {c1 d} "::c1: unable to dispatch method 'd'" - ? {C A assign 2} 2 + ? {C A set 2} 2 ? {C A get} 2 ? {C B} {method 'B' unknown for ::C; consider '::C create B ' instead of '::C B '} #? {C B} B2 @@ -324,7 +324,7 @@ :object property -accessor public {c c1} :object property -accessor protected {d d1} } - ? {o a assign 2} 2 + ? {o a set 2} 2 ? {o b} {::o: unable to dispatch method 'b'} #? {o b} b1 ? {o c get} c1 @@ -368,7 +368,7 @@ :property -accessor public a:int :create c1 } - ? {C x assign 1} 1 + ? {C x set 1} 1 ? {C x get} 1 ? {lsort [C info methods]} "a" ? {lsort [C info object methods]} "x" Index: tests/parameters.test =================================================================== diff -u -rc52c4d07b0c6921e5a94baa31e905ae21241eb25 -rdd169437c7a701da0063a40978614e6148d71221 --- tests/parameters.test (.../parameters.test) (revision c52c4d07b0c6921e5a94baa31e905ae21241eb25) +++ tests/parameters.test (.../parameters.test) (revision dd169437c7a701da0063a40978614e6148d71221) @@ -1070,7 +1070,7 @@ } - ? {ParamTest info method definition os} "::ParamTest public forward os ::ParamTest::slot::os %1 %self os" + ? {ParamTest info method definition os} "::ParamTest public forward os -prefix value= ::ParamTest::slot::os %1 %self os" ? {p os set o} \ "o" \ @@ -1280,7 +1280,7 @@ ? {C create c1 -a 1 -b 2} ::c1 ? {c1 info vars} "a b c" - ? {c1 a assign 100} 100 + ? {c1 a set 100} 100 ? {c1 b 101} {::c1: unable to dispatch method 'b'} ? {c1 c 102} {::c1: unable to dispatch method 'c'} } @@ -2677,7 +2677,7 @@ set ::slotcalls 0 nx::Class create Foo { :property -accessor public bar { - :public object method set { object property value } { + :public object method value=set { object property value } { incr ::slotcalls 1 nsf::var::set $object $property $value } @@ -2701,7 +2701,7 @@ set ::slotcalls 0 nx::Class create Foo { :property -accessor public {baz 1} { - :public object method set { object property value } { + :public object method value=set { object property value } { incr ::slotcalls 1 nsf::var::set $object $property $value } @@ -2733,7 +2733,7 @@ ? {nx::Class create Foo { :property -accessor none bar { - :public object method set { object property value } { + :public object method value=set { object property value } { incr ::slotcalls 1 nsf::var::set $object $property $value } @@ -2747,7 +2747,7 @@ # test cases for default nx::Class create Foo { :property -accessor none {baz 1} { - :public object method set { object property value } { + :public object method value=set { object property value } { incr ::slotcalls 1 nsf::var::set $object $property $value } @@ -2795,7 +2795,7 @@ nx::Class create Test2 { :property -accessor public list { - :public object method set { obj var val } { + :public object method value=set { obj var val } { nsf::var::set $obj $var [list $obj $var $val] } :object method unknown { val obj var args } { @@ -2824,7 +2824,7 @@ ? {o eval {info exists :a}} 0 ? {catch { o object variable -accessor public -initblock { - :public object method set args { + :public object method value=set args { incr :assignCalled next } Index: tests/properties.test =================================================================== diff -u -rc52c4d07b0c6921e5a94baa31e905ae21241eb25 -rdd169437c7a701da0063a40978614e6148d71221 --- tests/properties.test (.../properties.test) (revision c52c4d07b0c6921e5a94baa31e905ae21241eb25) +++ tests/properties.test (.../properties.test) (revision dd169437c7a701da0063a40978614e6148d71221) @@ -190,7 +190,7 @@ # The accessor should be a setter due to incremental # - ? {C info method definition b} {::C public forward b ::C::slot::b %1 %self b} + ? {C info method definition b} {::C public forward b -prefix value= ::C::slot::b %1 %self b} # # check error message on a typo. The following command does a @@ -361,7 +361,7 @@ # The accessor should be a forwarder due to incremental # - ? {CC info method definition b} {::CC public forward b ::CC::slot::b %1 %self b} + ? {CC info method definition b} {::CC public forward b -prefix value= ::CC::slot::b %1 %self b} # # check error message @@ -664,7 +664,7 @@ # The accessor should be a forwarder due to incremental # - ? {o1 info object method definition b} {::o1 public object forward b ::o1::per-object-slot::b %1 %self b} + ? {o1 info object method definition b} {::o1 public object forward b -prefix value= ::o1::per-object-slot::b %1 %self b} # # check error message