Index: generic/predefined.xotcl =================================================================== diff -u -r2454ab78913d0686b2ec5feeb401a051dc6a6164 -rd70c849219212800fa401c2227796b9a63eadcaf --- generic/predefined.xotcl (.../predefined.xotcl) (revision 2454ab78913d0686b2ec5feeb401a051dc6a6164) +++ generic/predefined.xotcl (.../predefined.xotcl) (revision d70c849219212800fa401c2227796b9a63eadcaf) @@ -50,14 +50,12 @@ # define method "method" for Class and Object ::xotcl::dispatch Class ::xotcl::cmd::Class::class-method method { - -per-object:switch name arguments body -precondition -postcondition } { set conditions [list] if {[info exists precondition]} {lappend conditions -precondition $precondition} if {[info exists postcondition]} {lappend conditions -postcondition $postcondition} - set cls [expr {${per-object} ? "Object" : "Class"}] - ::xotcl::dispatch [self] ::xotcl::cmd::${cls}::[string tolower $cls]-method \ + ::xotcl::dispatch [self] ::xotcl::cmd::Class::class-method \ $name $arguments $body {*}$conditions } @@ -67,8 +65,6 @@ set conditions [list] if {[info exists precondition]} {lappend conditions -precondition $precondition} if {[info exists postcondition]} {lappend conditions -postcondition $postcondition} - #puts stderr [subst {::xotcl::dispatch [self] ::xotcl::cmd::Object::object-method \ - # $name $arguments $body {*}$conditions}] ::xotcl::dispatch [self] ::xotcl::cmd::Object::object-method \ $name $arguments $body {*}$conditions } @@ -87,6 +83,9 @@ if {$what in [list "filter" "mixin"]} { return [.object-$what {*}$args] } + if {$what in [list "filterguard" "mixinguard"]} { + return [::xotcl::dispatch [self] ::xotcl::cmd::Object::$what {*}$args] + } } # define unknown handler for class @@ -156,10 +155,9 @@ $cmd } - Class public method alias {-objscope:switch -per-object:switch methodName cmd} { + Class public method alias {-objscope:switch methodName cmd} { ::xotcl::alias [self] $methodName \ {*}[expr {${objscope} ? "-objscope" : ""}] \ - {*}[expr {${per-object} ? "-per-object" : ""}] \ $cmd }