aboutsummaryrefslogtreecommitdiff
path: root/oo.tcl
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2011-12-16 13:00:30 +1000
committerSteve Bennett <steveb@workware.net.au>2011-12-16 13:10:13 +1000
commit73d257c2f0389f860d7f8fe826feee89f56dfbbb (patch)
tree86f3ee8f143fc1fdbcec1b3716c16f90333e2a10 /oo.tcl
parent535ce8fed169767e1bc834660e3088f5bccb603c (diff)
downloadjimtcl-73d257c2f0389f860d7f8fe826feee89f56dfbbb.zip
jimtcl-73d257c2f0389f860d7f8fe826feee89f56dfbbb.tar.gz
jimtcl-73d257c2f0389f860d7f8fe826feee89f56dfbbb.tar.bz2
oo: aliases are now commands, not procs
So fix oo.tcl when falling back to base class methods Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'oo.tcl')
-rw-r--r--oo.tcl4
1 files changed, 2 insertions, 2 deletions
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