From 73d257c2f0389f860d7f8fe826feee89f56dfbbb Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Fri, 16 Dec 2011 13:00:30 +1000 Subject: oo: aliases are now commands, not procs So fix oo.tcl when falling back to base class methods Signed-off-by: Steve Bennett --- oo.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'oo.tcl') diff --git a/oo.tcl b/oo.tcl index 090b511..b57daf5 100644 --- a/oo.tcl +++ b/oo.tcl @@ -28,7 +28,7 @@ proc class {classname {baseclasses {}} classvars} { # It simply dispatches 'classname cmd' to a procedure named {classname cmd} # with a nice message if the class procedure doesn't exist proc $classname {{cmd new} args} classname { - if {![exists -proc "$classname $cmd"]} { + if {![exists -command "$classname $cmd"]} { return -code error "$classname, unknown command \"$cmd\": should be [join [$classname methods] ", "]" } tailcall "$classname $cmd" {*}$args @@ -42,7 +42,7 @@ proc class {classname {baseclasses {}} classvars} { # Store the classname in both the ref value and tag, for debugging # ref tag (for debugging) proc [ref $classname $classname "$classname finalize"] {method args} {classname instvars} { - if {![exists -proc "$classname $method"]} { + if {![exists -command "$classname $method"]} { return -code error "$classname, unknown method \"$method\": should be [join [$classname methods] ", "]" } "$classname $method" {*}$args -- cgit v1.1