Index: library/nx/nx.tcl =================================================================== diff -u -rd4bf05d3f89dd055bb5c86cb7f3f82ca2321473c -rc52c4d07b0c6921e5a94baa31e905ae21241eb25 --- library/nx/nx.tcl (.../nx.tcl) (revision d4bf05d3f89dd055bb5c86cb7f3f82ca2321473c) +++ library/nx/nx.tcl (.../nx.tcl) (revision c52c4d07b0c6921e5a94baa31e905ae21241eb25) @@ -1382,13 +1382,21 @@ lappend options optional } if {$forObjectParameter} { + # + # 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"}} { # 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"}} { + # 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"}} { # In case the "get" method was provided on the slot, ask nsf to call it directly lappend options slot=[::nsf::self] } + if {[info exists :substdefault] && ${:substdefault}} { lappend options substdefault } @@ -1791,6 +1799,17 @@ if {[info exists restore]} { {*}$restore } } + ::nx::VariableSlot protected method setterRedefinedOptions {} { + if {[:info lookup method set] ne "::nsf::classes::nx::VariableSlot::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"} { + # In case the "get" method was provided on the slot, ask nsf to call it directly + return [list slot=[::nsf::self]] + } + } + ::nx::VariableSlot protected method getParameterOptions { {-withMultiplicity 0} {-forObjectParameter 0} @@ -1815,13 +1834,13 @@ lappend options slot=[::nsf::self] } } - } elseif {[:info lookup method assign] ne "::nsf::classes::nx::VariableSlot::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 get] ne "::nsf::classes::nx::VariableSlot::get"} { - # In case the "get" method was provided on the slot, ask nsf to call it directly - lappend options slot=[::nsf::self] } + if {$forObjectParameter} { + foreach o [:setterRedefinedOptions] { + if {$o ni $options} {lappend options $o} + } + } + if {[:info lookup method initialize] ne "" && $forObjectParameter} { if {"slot=[::nsf::self]" ni $options} {lappend options slot=[::nsf::self]} lappend options slotinitialize @@ -1844,29 +1863,28 @@ lappend options noconfig } } - #puts stderr "*** getParameterOptions [self] returns '$options'" + #puts stderr "*** getParameterOptions $withMultiplicity $forObjectParameter [self] returns '$options'" return $options } ::nx::VariableSlot protected method isMultivalued {} { return [string match {*..[n*]} ${:multiplicity}] } - ::nx::VariableSlot protected method needsForwarder {} { - # - # We just forward, when - # * "assign" 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 exists :settername]} {return 1} - if {!${:incremental}} {return 0} - #if {![:isMultivalued]} {return 0} - #puts stderr "[self] ismultivalued" - return 1 - } + # ::nx::VariableSlot protected method needsForwarder {} { + # # + # # We just forward, when + # # * "set", "get" and "add" are still untouched, or + # # * or incremental is specified + # # + # if {[:info lookup method add] ne "::nsf::classes::nx::VariableSlot::add"} {return 1} + # if {[:info lookup method set] ne "::nsf::classes::nx::VariableSlot::set"} {return 1} + # if {[:info lookup method get] ne "::nsf::classes::nx::VariableSlot::get"} {return 1} + # if {[info exists :settername]} {return 1} + # if {!${:incremental}} {return 0} + # #puts stderr "[self] ismultivalued" + # return 1 + # } # TODO: check detailed xotcl2 implications ::nx::VariableSlot protected method needsForwarder {} { @@ -1961,6 +1979,23 @@ ::nsf::method::setter ${:domain} {*}[expr {${:per-object} ? "-per-object" : ""}] $setterParam } + ::nx::VariableSlot protected method defineIncrementalOperations {options_single options} { + # + # Just define these setter methods, when these are not defined + # 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 {[:isMultivalued] && [:info lookup method add] eq "::nsf::classes::nx::VariableSlot::add"} { + lappend options_single slot=[::nsf::self] + :public object method add [list obj prop [:namedParameterSpec {} value $options_single] {pos 0}] {::nsf::next} + } else { + # TODO should we deactivate add/delete? + } + } + ::nx::VariableSlot protected method makeIncrementalOperations {} { set options_single [:getParameterOptions] #if {[llength $options_single] == 0} {} @@ -1969,25 +2004,12 @@ # nx::VariableSlot are sufficient return } - #puts "makeIncrementalOperations -- $options_single // [:info vars]" + #puts "makeIncrementalOperations -- single $options_single type ${:type}" #if {[info exists :type]} {puts ".... type ${:type}"} set options [:getParameterOptions -withMultiplicity true] lappend options slot=[::nsf::self] - set body {::nsf::var::set $obj $var $value} - # We need the following rule e.g. for private properties, where - # the setting of the property is handled via slot. - if {[:info lookup method assign] eq "::nsf::classes::nx::VariableSlot::assign"} { - #puts stderr ":public object method assign [list obj var [:namedParameterSpec {} value $options]] $body" - :public object method assign [list obj var [:namedParameterSpec {} value $options]] $body - } - if {[:isMultivalued] && [:info lookup method add] eq "::nsf::classes::nx::VariableSlot::add"} { - lappend options_single slot=[::nsf::self] - #puts stderr ":public object method add [list obj prop [:namedParameterSpec {} value $options_single] {pos 0}] {::nsf::next}" - :public object method add [list obj prop [:namedParameterSpec {} value $options_single] {pos 0}] {::nsf::next} - } else { - # TODO should we deactivate add/delete? - } + :defineIncrementalOperations $options_single $options } ###################################################################### @@ -2078,6 +2100,7 @@ ::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 ::nx::VariableSlot public method add {obj prop value {pos 0}} { if {![:isMultivalued]} { Index: library/xotcl/library/xotcl2.tcl =================================================================== diff -u -rd4bf05d3f89dd055bb5c86cb7f3f82ca2321473c -rc52c4d07b0c6921e5a94baa31e905ae21241eb25 --- library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision d4bf05d3f89dd055bb5c86cb7f3f82ca2321473c) +++ library/xotcl/library/xotcl2.tcl (.../xotcl2.tcl) (revision c52c4d07b0c6921e5a94baa31e905ae21241eb25) @@ -65,6 +65,8 @@ -object.init init -object.move move -object.unknown unknown + -slot.set assign + -slot.get get } # @@ -443,11 +445,41 @@ # specified explicitly) and metaclass, in case they should differ # from the root classes of the object system. - ::xotcl::Class parameter { + proc createBootstrapVariableSlots {class definitions} { + foreach att $definitions { + if {[llength $att]>1} {lassign $att att default} + set slotObj [::nx::slotObj $class $att] + #puts stderr "::nx::BootStrapVariableSlot create $slotObj" + ::nx::BootStrapVariableSlot create $slotObj + if {[info exists default]} { + #puts stderr "::nsf::var::set $slotObj default $default" + ::nsf::var::set $slotObj default $default + unset default + } + # + # register the standard setter + # + ::nsf::method::setter $class $att + + # + # make setter protected + # + #regexp {^([^:]+):} $att . att + #::nsf::method::property $class $att call-protected true + # + # set for every bootstrap property slot the position 0 + # + ::nsf::var::set $slotObj position 0 + ::nsf::var::set $slotObj configurable 1 + } + } + + createBootstrapVariableSlots ::xotcl::Class { {__default_superclass ::xotcl::Object} {__default_metaclass ::xotcl::Class} } + ############################################ # Register system slots ############################################ @@ -1020,7 +1052,11 @@ #:property defaultmethods {get assign} :property -accessor public multivalued { - :public object method assign {object property value} { + # + # The slot object is an nx object, therefore we need "set" + # rather than "assign" + # + :public object method set {object property value} { set mClass [expr {$value ? "0..n" : "1..1"}] $object configure -incremental $value -multiplicity $mClass } @@ -1029,10 +1065,38 @@ } } + :protected method setterRedefinedOptions {} { + if {[:info lookup method assign] ne "::nsf::classes::nx::VariableSlot::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"} { + # In case the "get" method was provided on the slot, ask nsf to call it directly + return [list slot=[::nsf::self]] + } + } + + :protected method defineIncrementalOperations {options_single options} { + # + # Just define these setter methods, when these are not defined + # 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 {[:isMultivalued] && [:info lookup method add] eq "::nsf::classes::nx::VariableSlot::add"} { + lappend options_single slot=[::nsf::self] + :public object method add [list obj prop [:namedParameterSpec {} value $options_single] {pos 0}] {::nsf::next} + } else { + # TODO should we deactivate add/delete? + } + } + :protected method needsForwarder {} { # # We just forward, when - # * "assign" and "add" are still untouched, or + # * "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} @@ -1041,7 +1105,7 @@ if {[info exists :settername]} {return 1} if {!${:incremental}} {return 0} #if {![:isMultivalued]} {return 0} - #puts stderr "[self] ismultivalued" + #puts stderr "--------------- [self] ismultivalued" return 1 } Index: tests/alias.test =================================================================== diff -u -r4bc60e16c10fdbbb640b3019d4bdebdc469fdf55 -rc52c4d07b0c6921e5a94baa31e905ae21241eb25 --- tests/alias.test (.../alias.test) (revision 4bc60e16c10fdbbb640b3019d4bdebdc469fdf55) +++ tests/alias.test (.../alias.test) (revision c52c4d07b0c6921e5a94baa31e905ae21241eb25) @@ -9,7 +9,7 @@ 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} + ? {lsort [::nx::VariableSlot info methods -type alias]} {assign get set} ? {::nx::VariableSlot info method definition get} \ "::nx::VariableSlot public alias get ::nsf::var::set" Index: tests/cget.test =================================================================== diff -u -r85ee1fdb043ed3f82fd272cc004c476c40861fdb -rc52c4d07b0c6921e5a94baa31e905ae21241eb25 --- tests/cget.test (.../cget.test) (revision 85ee1fdb043ed3f82fd272cc004c476c40861fdb) +++ tests/cget.test (.../cget.test) (revision c52c4d07b0c6921e5a94baa31e905ae21241eb25) @@ -80,7 +80,7 @@ incr ::count(cget) nsf::var::set $object $property } - :public object method assign { object property value } { + :public object method set { object property value } { incr ::count(assign) nsf::var::set $object $property $value } @@ -191,7 +191,7 @@ :public object method get { object property } { nsf::var::set $object $property } - :public object method assign { object property value } { + :public object method set { object property value } { nsf::var::set $object $property $value } } Index: tests/methods.test =================================================================== diff -u -rd4bf05d3f89dd055bb5c86cb7f3f82ca2321473c -rc52c4d07b0c6921e5a94baa31e905ae21241eb25 --- tests/methods.test (.../methods.test) (revision d4bf05d3f89dd055bb5c86cb7f3f82ca2321473c) +++ tests/methods.test (.../methods.test) (revision c52c4d07b0c6921e5a94baa31e905ae21241eb25) @@ -372,7 +372,7 @@ ? {C x get} 1 ? {lsort [C info methods]} "a" ? {lsort [C info object methods]} "x" - ? {c1 a assign b} {expected integer but got "b" for parameter "value"} + ? {c1 a set b} {expected integer but got "b" for parameter "value"} set s(C) [C serialize] set s(c1) [c1 serialize] @@ -394,7 +394,7 @@ ? {C x get} 1 ? {lsort [C info methods]} "a" ? {lsort [C info object methods]} "x" - ? {c1 a assign b} {expected integer but got "b" for parameter "value"} + ? {c1 a set b} {expected integer but got "b" for parameter "value"} } # Index: tests/parameters.test =================================================================== diff -u -ra615b76dd389290567bc8506fec6fa0a3b2c14d2 -rc52c4d07b0c6921e5a94baa31e905ae21241eb25 --- tests/parameters.test (.../parameters.test) (revision a615b76dd389290567bc8506fec6fa0a3b2c14d2) +++ tests/parameters.test (.../parameters.test) (revision c52c4d07b0c6921e5a94baa31e905ae21241eb25) @@ -1072,15 +1072,15 @@ ? {ParamTest info method definition os} "::ParamTest public forward os ::ParamTest::slot::os %1 %self os" - ? {p os assign o} \ + ? {p os set o} \ "o" \ "value is a list of objects (1 element)" - ? {p os assign {o c1 d1}} \ + ? {p os set {o c1 d1}} \ "o c1 d1" \ "value is a list of objects (multiple elements)" - ? {p os assign {o xxx d1}} \ + ? {p os set {o xxx d1}} \ {invalid value in "o xxx d1": expected object but got "xxx" for parameter "value"} \ "list with invalid object" } @@ -1207,7 +1207,7 @@ ? {p1 sex get} m Person public method foo {s:sex,slot=::Person::slot::sex,convert} {return $s} ? {p1 foo male} m - ? {p1 sex assign male} m + ? {p1 sex set male} m } ####################################################### @@ -1265,9 +1265,9 @@ } C create c1 - ? {c1 a assign 1} 1 - ? {c1 b assign 1} 1 - ? {c1 c assign 1} 1 + ? {c1 a set 1} 1 + ? {c1 b set 1} 1 + ? {c1 c set 1} 1 } nx::test configure -count 10 @@ -1338,14 +1338,14 @@ ? {o a get} 4 ? {o b get} 44 - ? {o c assign 5} 999 + ? {o c set 5} 999 ? {::nsf::object::property o hasperobjectslots} 1 o copy o2 ? {o a get} 4 ? {o b get} 44 - ? {o c assign 5} 999 + ? {o c set 5} 999 ? {::nsf::object::property o2 hasperobjectslots} 1 ::nx::Class create C { @@ -1356,20 +1356,20 @@ } ? {c1 a get} 4 ? {c1 b get} 44 - ? {c1 c assign 5} 999 + ? {c1 c set 5} 999 c1 copy c2 ? {c2 a get} 4 ? {c2 b get} 44 - ? {c2 c assign 5} 999 + ? {c2 c set 5} 999 C copy D D create d1 ? {d1 a get} 4 ? {d1 b get} 44 - ? {d1 c assign 5} 999 + ? {d1 c set 5} 999 } nx::test case slot-trace-interaction { @@ -1414,9 +1414,9 @@ ? {o eval {info exists :a}} 1 ? {o a get} 0 - ? {o a assign 1} 2 + ? {o a set 1} 2 ? {o a get} 2 - ? {o a assign 2} 3 + ? {o a set 2} 3 ? {o eval {info exists :A}} 0 o object property {A 0} { @@ -1450,9 +1450,9 @@ Klass create k ? {k eval {info exists :a}} 1 ? {k a get} 0; # should be 1, reflecting the corresponding per-object case above - ? {k a assign 1} 2 + ? {k a set 1} 2 ? {k a get} 2 - ? {k a assign 2} 3 + ? {k a set 2} 3 # # 2) Have initcmd scripts escaped from C-level argument checking (in @@ -1501,7 +1501,7 @@ ? {cc cget -a} 4 ? {cc cget -b} 44 - ? {cc c assign 5} 999 + ? {cc c set 5} 999 } @@ -1644,7 +1644,7 @@ ? {c1 cget -a} 1 # change the value from the default to a different value - ? {c1 a assign 2} 2 + ? {c1 a set 2} 2 ? {c1 a get} 2 # call configure ... c1 __configure @@ -2466,7 +2466,7 @@ ? {C info methods} "foo" ? {c1 info lookup method foo} "::nsf::classes::C::foo" ? {c1 foo get} 0 - ? {c1 foo assign 1} 1 + ? {c1 foo set 1} 1 ? {c1 foo get} 1 # When the object parameter is specified, the instance variable has @@ -2671,13 +2671,13 @@ } # -# Test forwarding to slot object, when assign is overloaded +# Test forwarding to slot object, when set is overloaded # -nx::test case forward-to-assign { +nx::test case forward-to-set { set ::slotcalls 0 nx::Class create Foo { :property -accessor public bar { - :public object method assign { object property value } { + :public object method 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 assign { object property value } { + :public object method set { object property value } { incr ::slotcalls 1 nsf::var::set $object $property $value } @@ -2711,14 +2711,14 @@ # call with default, without object parameter value set o [Foo new] ? [list $o eval {info exists :baz}] 1 - ? {set ::slotcalls} 1 + ? {set ::slotcalls} 1 "baz without object parameter value" ? [list $o baz get] "1" # call with default, with object parameter value set o [Foo new -baz "test"] ? [list $o eval {info exists :baz}] 1 - ? {set ::slotcalls} 2 + ? {set ::slotcalls} 2 "baz with object parameter value" ? [list $o baz get] "test" ? {Foo info method exists baz} 1 @@ -2728,12 +2728,12 @@ # # Test forwarding to slot vs. accessor none # -nx::test case forward-to-assign { +nx::test case forward-to-set2 { set ::slotcalls 0 ? {nx::Class create Foo { :property -accessor none bar { - :public object method assign { object property value } { + :public object method 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 assign { object property value } { + :public object method 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 assign { obj var val } { + :public object method set { obj var val } { nsf::var::set $obj $var [list $obj $var $val] } :object method unknown { val obj var args } { @@ -2805,7 +2805,7 @@ } ? {Test2 create t2} ::t2 - ? {t2 list assign 3} {::t2 list 3} + ? {t2 list set 3} {::t2 list 3} ? {t2 list get} {::t2 list 3} ? {t2 list this should call unknown} "unknown" } @@ -2814,7 +2814,7 @@ # # In the scenario below, setCheckedInstVar is executed and performs # an ::nsf::is value check on the default value. However, given the - # custom assign method, the parameter option slotassign is passed on + # custom set method, the parameter option slotset is passed on # to ::nsf::is which (currently) does not accept it: # # 'invalid value constraints @@ -2824,7 +2824,7 @@ ? {o eval {info exists :a}} 0 ? {catch { o object variable -accessor public -initblock { - :public object method assign args { + :public object method set args { incr :assignCalled next } Index: tests/properties.test =================================================================== diff -u -r91007cd5fdd2f8f125fdd433ef7701574e8167d2 -rc52c4d07b0c6921e5a94baa31e905ae21241eb25 --- tests/properties.test (.../properties.test) (revision 91007cd5fdd2f8f125fdd433ef7701574e8167d2) +++ tests/properties.test (.../properties.test) (revision c52c4d07b0c6921e5a94baa31e905ae21241eb25) @@ -727,13 +727,13 @@ ? {o1 info variable definition [o1 info object variables d]} \ "::o1 object property -accessor public -incremental d:integer,1..n" - ? {o1 a assign {1 2 3}} {1 2 3} - ? {o1 b assign {1 2 3}} {1 2 3} + ? {o1 a set {1 2 3}} {1 2 3} + ? {o1 b set {1 2 3}} {1 2 3} - ? {o1 a assign ""} {} - ? {o1 b assign ""} {invalid value for parameter 'value': list is not allowed to be empty} - ? {o1 c assign ""} {} - ? {o1 d assign ""} {invalid value for parameter 'value': list is not allowed to be empty} + ? {o1 a set ""} {} + ? {o1 b set ""} {invalid value for parameter 'value': list is not allowed to be empty} + ? {o1 c set ""} {} + ? {o1 d set ""} {invalid value for parameter 'value': list is not allowed to be empty} } @@ -888,7 +888,7 @@ ? {o1 configure -a a2} "" ? {o1 b get} b1 - ? {o1 b assign b2} "b2" + ? {o1 b set b2} "b2" ? {o1 configure -class ::nx::Object} "" ? {o1 cget -class} ::nx::Object Index: tests/protected.test =================================================================== diff -u -ra615b76dd389290567bc8506fec6fa0a3b2c14d2 -rc52c4d07b0c6921e5a94baa31e905ae21241eb25 --- tests/protected.test (.../protected.test) (revision a615b76dd389290567bc8506fec6fa0a3b2c14d2) +++ tests/protected.test (.../protected.test) (revision c52c4d07b0c6921e5a94baa31e905ae21241eb25) @@ -695,7 +695,7 @@ :property -accessor private {d:integer 1} :public method foo {p} {return [: $p get]} :public method bar {p} {return [: -local $p get]} - :public method baz {p v} {return [: -local $p assign $v]} + :public method baz {p v} {return [: -local $p set $v]} :create c1 } @@ -802,7 +802,7 @@ :object property -accessor private {d:integer 1} :public object method foo {p} {return [: $p get]} :public object method bar {p} {return [: -local $p get]} - :public object method baz {p v} {return [: -local $p assign $v]} + :public object method baz {p v} {return [: -local $p set $v]} } ? {o a get} a1 @@ -838,7 +838,7 @@ :object property -accessor private {d:integer 1} :public object method foo {p} {return [: $p get]} :public object method bar {p} {return [: -local $p get]} - :public object method baz {p v} {return [: -local $p assign $v]} + :public object method baz {p v} {return [: -local $p set $v]} } ? {C a get} a1 Index: tests/serialize.test =================================================================== diff -u -r91007cd5fdd2f8f125fdd433ef7701574e8167d2 -rc52c4d07b0c6921e5a94baa31e905ae21241eb25 --- tests/serialize.test (.../serialize.test) (revision 91007cd5fdd2f8f125fdd433ef7701574e8167d2) +++ tests/serialize.test (.../serialize.test) (revision c52c4d07b0c6921e5a94baa31e905ae21241eb25) @@ -8,7 +8,7 @@ Object create ::a { :object property -accessor public ref:object,type=[:info class] Object create [self]::b { - [:info parent] ref assign [Object create [self]::c] + [:info parent] ref set [Object create [self]::c] } } @@ -62,16 +62,16 @@ :create c1 } - ? {C x assign 1} 1 + ? {C x set 1} 1 ? {C x get} 1 - ? {C y assign 1} 1 + ? {C y set 1} 1 ? {C y get} 1 ? {lsort [C info methods]} "a b" ? {lsort [C info object methods]} "x y" - ? {c1 a assign b} {expected integer but got "b" for parameter "value"} - ? {c1 a assign 1} 1 - ? {c1 b assign 1} 1 + ? {c1 a set b} {expected integer but got "b" for parameter "value"} + ? {c1 a set 1} 1 + ? {c1 b set 1} 1 set c1(IgnoreNone1) [list [::Serializer deepSerialize c1] "a b"] set c1(IgnoreNone2) [list [::Serializer deepSerialize -ignoreVarsRE "" c1] "a b"]