Index: generic/predefined.xotcl =================================================================== diff -u -r7d9452f6a7cc8b99fd09058dfbb8992e0cba5b9e -r62a9d39ecd1f540f08c895175a7f085cfb4ae845 --- generic/predefined.xotcl (.../predefined.xotcl) (revision 7d9452f6a7cc8b99fd09058dfbb8992e0cba5b9e) +++ generic/predefined.xotcl (.../predefined.xotcl) (revision 62a9d39ecd1f540f08c895175a7f085cfb4ae845) @@ -17,7 +17,7 @@ # provide the standard command set for ::xotcl2::Object foreach cmd [info command ::xotcl::cmd::Object::*] { set cmdName [namespace tail $cmd] - if {$cmdName in [list "instvar" "object-method"]} continue + if {$cmdName in [list "instvar"]} continue ::xotcl::alias Object $cmdName $cmd } @@ -30,7 +30,6 @@ # provide the standard command set for Class foreach cmd [info command ::xotcl::cmd::Class::*] { set cmdName [namespace tail $cmd] - if {$cmdName in [list "class-method"]} continue ::xotcl::alias Class $cmdName $cmd } @@ -50,24 +49,22 @@ ::xotcl::methodproperty Class create redefine-protected true # define method "method" for Class and Object - ::xotcl::dispatch Class ::xotcl::cmd::Class::class-method method { + ::xotcl::method Class method { name arguments body -precondition -postcondition } { set conditions [list] if {[info exists precondition]} {lappend conditions -precondition $precondition} if {[info exists postcondition]} {lappend conditions -postcondition $postcondition} - ::xotcl::dispatch [self] ::xotcl::cmd::Class::class-method \ - $name $arguments $body {*}$conditions + ::xotcl::method [self] $name $arguments $body {*}$conditions } - ::xotcl::dispatch Object ::xotcl::cmd::Class::class-method method { + ::xotcl::method Object method { name arguments body -precondition -postcondition } { set conditions [list] if {[info exists precondition]} {lappend conditions -precondition $precondition} if {[info exists postcondition]} {lappend conditions -postcondition $postcondition} - ::xotcl::dispatch [self] ::xotcl::cmd::Object::object-method \ - $name $arguments $body {*}$conditions + ::xotcl::method [self] -per-object $name $arguments $body {*}$conditions } # define method modifiers "object", "public" and "protected"