Index: generic/predefined.h =================================================================== diff -u -rafa1cb8064311ef406ae50c499c026c8576393f8 -r0c8c36d48b1a146780b7ba8966196ad1b7075dda --- generic/predefined.h (.../predefined.h) (revision afa1cb8064311ef406ae50c499c026c8576393f8) +++ generic/predefined.h (.../predefined.h) (revision 0c8c36d48b1a146780b7ba8966196ad1b7075dda) @@ -437,6 +437,21 @@ "namespace eval $object $cmds}}\n" "::xotcl2::Class instforward slots %self contains \\\n" "-object {%::xotcl::dispatch [::xotcl::self] -objscope ::subst [::xotcl::self]::slot}\n" +"::xotcl::Object 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 instmixin add $m end\n" +"namespace eval $object $cmds\n" +"::xotcl2::Class instmixin delete $m} else {\n" +"namespace eval $object $cmds}}\n" "::xotcl::Class instforward slots %self contains \\\n" "-object {%::xotcl::dispatch [::xotcl::self] -objscope ::subst [::xotcl::self]::slot}\n" "::xotcl2::Class method parameter arglist {\n" @@ -499,7 +514,6 @@ "::xotcl::Class method allinstances {} {\n" "return [.info instances -closure]}\n" "::xotcl::alias ::xotcl::Class parameter ::xotcl::classes::xotcl2::Class::parameter\n" -"::xotcl::alias ::xotcl::Object contains ::xotcl::classes::xotcl2::Object::contains\n" "::xotcl::alias ::xotcl2::Object defaultmethod ::xotcl::classes::xotcl::Object::defaultmethod\n" "::xotcl::Object method -per-object unsetExitHandler {} {\n" "::xotcl::Object method -per-object __exitHandler {} {\n"