Index: tests/slottest.xotcl =================================================================== diff -u -r2c0baf4a8ccba0820da0b4f318be18d2051e00ae -r81c800c8b9cb42ef6743d9b80ac2be5ca211a69a --- tests/slottest.xotcl (.../slottest.xotcl) (revision 2c0baf4a8ccba0820da0b4f318be18d2051e00ae) +++ tests/slottest.xotcl (.../slottest.xotcl) (revision 81c800c8b9cb42ef6743d9b80ac2be5ca211a69a) @@ -1,4 +1,4 @@ -package require XOTcl; xotcl::use xotcl1 +package require XOTcl; namespace import ::xotcl::* package require xotcl::test Test parameter count 1000 @@ -97,7 +97,7 @@ # "class" is not multivalued, therefore we should not add (or remove) add/delete # from the set of subcommands... -? {::xotcl::RelationSlot class} "::xotcl::MetaSlot" +? {::next::RelationSlot class} "::next::MetaSlot" O o1 ? {o1 class} "::O" o1 class Object @@ -111,7 +111,7 @@ #? {O2 superclass O} "superclass 1" ? {O superclass} "::xotcl::Object" -::xotcl::ObjectParameterSlot method slot {object name property} { +::next::ObjectParameterSlot method slot {object name property} { switch $property { self {return [self]} domain {return [my domain]} @@ -169,18 +169,18 @@ Object o1 o1 set i 0 -::xotcl::alias o1 Incr -objscope ::incr +::next::core::alias o1 Incr -objscope ::incr ? {o1 incr i} 1 "method incr" ? {o1 Incr i} 1002 "aliased tcl incr" ? {o1 incr i} 2003 "method incr" ? {o1 Incr i} 3004 "aliased tcl incr" -::xotcl::alias ::xotcl::Object Set -objscope ::set +::next::core::alias ::xotcl::Object Set -objscope ::set ? {o1 set i 1} 1 "method set" ? {o1 set i} 1 "method set" ? {o1 Set i 1} 1 "aliased tcl set" ? {o1 Set i} 1 "aliased tcl set" -::xotcl::alias o1 Set -objscope ::set +::next::core::alias o1 Set -objscope ::set ? {o1 Set i 1} 1 "aliased object tcl set" ? {o1 Set i} 1 "aliased object tcl set" ::xotcl::Object instforward SSet -earlybinding -objscope ::set @@ -191,15 +191,15 @@ o1 set z 100 #o1 forward z o1 [list %argclindex [list set set]] %proc #o1 proc get name {my set $name} -o1 forward get -earlybinding ::xotcl::setvar %self %1 +o1 forward get -earlybinding ::next::core::setvar %self %1 ? {o1 get z 101} 101 ? {o1 get z} "101" ? {o1 get z} 101 "get value via new parametercmd get" ? {o1 get z 124} 124 "set value via new parametercmd get" -o1 forward zz -earlybinding ::xotcl::setvar %self %proc +o1 forward zz -earlybinding ::next::core::setvar %self %proc ? {o1 zz 123} 123 ? {o1 zz} 123 @@ -251,7 +251,7 @@ # } # } -::xotcl::Attribute mixin delete ::xotcl::Attribute::Optimizer +::xotcl::Attribute mixin delete ::next::Attribute::Optimizer Class C1 -parameter {a {b 10} {c "Hello World"}} C1 c1 -a 1 @@ -277,7 +277,7 @@ ? {c2 a} 1 "new indirect parametercmd" ? {c2 a 1} 1 "new indirect parametercmd" -::xotcl::Attribute mixin add ::xotcl::Attribute::Optimizer +::xotcl::Attribute mixin add ::next::Attribute::Optimizer Class C3 -slots { Attribute create a @@ -319,7 +319,7 @@ ? {a0 procsearch f3} "::a0 proc f3" ? {a0 procsearch f4} "::a0 forward f4" ? {a0 procsearch set} "::xotcl::Object instcmd set" -? {A slot foo info callable -which assign} "::xotcl::ObjectParameterSlot alias assign ::xotcl::setvar" +? {A slot foo info callable -which assign} "::next::ObjectParameterSlot alias assign ::next::core::setvar" # redefine setter for foo of class A A slot foo method assign {domain var val} { @@ -362,7 +362,7 @@ #p1 projects add some-other-value #? {p1 projects} "some-other-value ::project1" -::xotcl::ObjectParameterSlot method check { +::next::ObjectParameterSlot method check { {-keep_old_value:boolean true} value predicate type obj var } { @@ -378,7 +378,7 @@ if {$keep_old_value} {$obj set __oldvalue($var) $value} } -::xotcl::ObjectParameterSlot method checkall {values predicate type obj var} { +::next::ObjectParameterSlot method checkall {values predicate type obj var} { foreach value $values { my check -keep_old_value false $value $predicate $type $obj $var } @@ -536,7 +536,7 @@ ? {o1 myf 100} 200 o1 set x 42 -o1 forward x -earlybinding ::xotcl::setvar %self %proc +o1 forward x -earlybinding ::next::core::setvar %self %proc ? [list o1 x] 42 ? [list o1 x 41] 41 ? {o1 x} "get parametercmd via forward (earlybinding)" @@ -559,7 +559,7 @@ ? {o1 myfdset y} "get instvar value via forward -earlybinding" ? {o1 myfdset y 123} "set instvar value via forward -earlybinding" -::xotcl::alias o1 myset -objscope ::set +::next::core::alias o1 myset -objscope ::set o1 myset x 101 ? {o1 myset x} 101 @@ -575,7 +575,7 @@ P create p2 -age 345 -s 567 ? {p2 age} "parametercmd read" -? {::xotcl::setvar p2 age} "via setinstvar" +? {::next::core::setvar p2 age} "via setinstvar" ? {p2 s} "parameter read with setter"