Index: generic/predefined.h =================================================================== diff -u -rd3aa8e069917e7ba7d69e936ec4e563b7e0dc34d -r1e72a93dd117734d0ab49c7ea7aa87f69f9a00b5 --- generic/predefined.h (.../predefined.h) (revision d3aa8e069917e7ba7d69e936ec4e563b7e0dc34d) +++ generic/predefined.h (.../predefined.h) (revision 1e72a93dd117734d0ab49c7ea7aa87f69f9a00b5) @@ -142,12 +142,9 @@ "proc ::xotcl::getExitHandler {} {::info body ::xotcl::__exitHandler}\n" "::xotcl::unsetExitHandler\n" "namespace export Object Class}\n" +"namespace eval ::xotcl {\n" "::xotcl2::Class create ::xotcl::MetaSlot\n" "::xotcl::relation ::xotcl::MetaSlot superclass ::xotcl2::Class\n" -"::xotcl::MetaSlot public method new args {\n" -"set slotobject [::xotcl::self callingobject]::slot\n" -"if {![::xotcl::is $slotobject object]} {::xotcls::Object create $slotobject}\n" -"eval next -childof $slotobject $args}\n" "::xotcl::MetaSlot create ::xotcl::Slot\n" "::xotcl::MetaSlot __invalidateobjectparameter\n" "proc ::xotcl::parameterFromSlot {slot name} {\n" @@ -209,7 +206,7 @@ "-volatile:method,optional,noarg \\\n" "arg:initcmd,optional\n" "return $parameterdefinitions}\n" -"::xotcl2::Class create ::xotcl::ParameterSlot\n" +"::xotcl::MetaSlot create ::xotcl::ParameterSlot\n" "foreach cmd [info command ::xotcl::cmd::ParameterSlot::*] {\n" "::xotcl::alias ::xotcl::ParameterSlot [namespace tail $cmd] $cmd}\n" "::xotcl::ParameterSlot create ::xotcl::parameterSlot\n" @@ -417,33 +414,6 @@ "if {[:info callable -which get] ne \"::xotcl::Slot alias get ::xotcl::setinstvar\"} return\n" "::xotcl::setter ${:domain} {*}[expr {${:per-object} ? \"-per-object\" : \"\"}] ${:name}}}\n" "::xotcl::Attribute mixin add ::xotcl::Slot::Optimizer\n" -"::xotcl2::Class create ::xotcl::ScopedNew -superclass ::xotcl2::Class\n" -"createBootstrapAttributeSlots ::xotcl::ScopedNew {\n" -"{withclass ::xotcl2::Object}\n" -"inobject}\n" -"::xotcl::ScopedNew method init {} {\n" -":public method new {-childof args} {\n" -"::xotcl::importvar [::xotcl::self class] {inobject object} withclass\n" -"if {![::xotcl::is $object object]} {\n" -"$withclass create $object}\n" -"eval ::xotcl::next -childof $object $args}}\n" -"::xotcl2::Object public method contains {\n" -"{-withnew:boolean true}\n" -"-object\n" -"{-class ::xotcl2::Object}\n" -"cmds} {\n" -"if {![info exists object]} {set object [::xotcl::self]}\n" -"if {![::xotcl::is $object object]} {$class create $object}\n" -"$object requireNamespace\n" -"if {$withnew} {\n" -"set m [::xotcl::ScopedNew new \\\n" -"-inobject $object -withclass $class -volatile]\n" -"::xotcl2::Class mixin add $m end\n" -"namespace eval $object $cmds\n" -"::xotcl2::Class mixin delete $m} else {\n" -"namespace eval $object $cmds}}\n" -"::xotcl2::Class forward slots %self contains \\\n" -"-object {%::xotcl::dispatch [::xotcl::self] -objscope ::subst [::xotcl::self]::slot}\n" "::xotcl2::Class public method parameter arglist {\n" "if {![::xotcl::is [::xotcl::self]::slot object]} {\n" "::xotcl2::Object create [::xotcl::self]::slot}\n" @@ -501,6 +471,33 @@ "$po unset -nocomplain $instvar}} else {\n" ".setter $name}}}\n" "::xotcl::setinstvar [::xotcl::self]::slot __parameter $arglist}\n" +"proc createBootstrapAttributeSlots {} {}}\n" +"::xotcl2::Class create ::xotcl::ScopedNew -superclass ::xotcl2::Class -parameter {\n" +"{withclass ::xotcl2::Object}\n" +"inobject}\n" +"::xotcl::ScopedNew method init {} {\n" +":public method new {-childof args} {\n" +"::xotcl::importvar [::xotcl::self class] {inobject object} withclass\n" +"if {![::xotcl::is $object object]} {\n" +"$withclass create $object}\n" +"eval ::xotcl::next -childof $object $args}}\n" +"::xotcl2::Object public method contains {\n" +"{-withnew:boolean true}\n" +"-object\n" +"{-class ::xotcl2::Object}\n" +"cmds} {\n" +"if {![info exists object]} {set object [::xotcl::self]}\n" +"if {![::xotcl::is $object object]} {$class create $object}\n" +"$object requireNamespace\n" +"if {$withnew} {\n" +"set m [::xotcl::ScopedNew new \\\n" +"-inobject $object -withclass $class -volatile]\n" +"::xotcl2::Class mixin add $m end\n" +"namespace eval $object $cmds\n" +"::xotcl2::Class mixin delete $m} else {\n" +"namespace eval $object $cmds}}\n" +"::xotcl2::Class forward slots %self contains \\\n" +"-object {%::xotcl::dispatch [::xotcl::self] -objscope ::subst [::xotcl::self]::slot}\n" "::xotcl2::Class create ::xotcl::CopyHandler -parameter {\n" "{targetList \"\"}\n" "{dest \"\"}\n"