Index: library/xotcl/tests/slottest.xotcl =================================================================== diff -u -r4bc60e16c10fdbbb640b3019d4bdebdc469fdf55 -rd9344280c05990c0254aa652a08a09da3e5822b1 --- library/xotcl/tests/slottest.xotcl (.../slottest.xotcl) (revision 4bc60e16c10fdbbb640b3019d4bdebdc469fdf55) +++ library/xotcl/tests/slottest.xotcl (.../slottest.xotcl) (revision d9344280c05990c0254aa652a08a09da3e5822b1) @@ -113,8 +113,8 @@ ? {o1 class} "::O" o1 class Object ? {o1 class} "::xotcl::Object" -? {o1 objectparameter} "-mixin:mixinreg,alias,0..n -filter:filterreg,alias,0..n -class:class,alias args:alias,method=residualargs,args" -? {Object objectparameter} "-instfilter:filterreg,alias,0..n -superclass:alias,0..n -instmixin:mixinreg,alias,0..n {-__default_metaclass ::xotcl::Class} {-__default_superclass ::xotcl::Object} -mixin:mixinreg,alias,0..n -filter:filterreg,alias,0..n -class:class,alias args:alias,method=residualargs,args" +? {o1 __object_configureparameter} "-mixin:mixinreg,alias,0..n -filter:filterreg,alias,0..n -class:class,alias args:alias,method=residualargs,args" +? {Object __object_configureparameter} "-instfilter:filterreg,alias,0..n -superclass:alias,0..n -instmixin:mixinreg,alias,0..n {-__default_metaclass ::xotcl::Class} {-__default_superclass ::xotcl::Object} -mixin:mixinreg,alias,0..n -filter:filterreg,alias,0..n -class:class,alias args:alias,method=residualargs,args" ? {o1 class add M} {class: expected a class but got "M ::xotcl::Object"} @@ -131,8 +131,9 @@ } } -? {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" O2 superclass add M @@ -210,8 +211,8 @@ } puts [Person serialize] -Person::slot::name default "gustaf" -? {Person::slot::name default} gustaf +Person::slot::name configure -default "gustaf" +? {Person::slot::name cget -default} gustaf Person p1 -name neophytos ? {p1 name} neophytos ? {p1 age} 0 @@ -376,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=set} "::nsf::classes::xotcl::Attribute::value=set" # redefine setter for foo of class A #A slot foo method assign {domain var val} ... @@ -545,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=set {domain var value} { if {$value < 0 || $value > 99} { error "$value is not in the range of 0 .. 99" } @@ -619,9 +620,9 @@ ? {lsort [Person info slots]} "::Person::slot::name ::Person::slot::projects ::Person::slot::salary" -? {Person::slot::name multivalued} 0 -? {Person::slot::salary multivalued} 0 -? {Person::slot::projects multivalued} 1 +? {Person::slot::name multivalued get} 0 +? {Person::slot::salary multivalued get} 0 +? {Person::slot::projects multivalued get} 1 Person p2 -name "John Doe" ? {p2 name} "John Doe" @@ -645,7 +646,7 @@ # Class create AA -slots { - Attribute foo -default 1 -proc assign {domain var value} { + Attribute foo -default 1 -proc value=set {domain var value} { if {$value < 0 || $value > 99} { error "$value is not in the range of 0 .. 99" }