summaryrefslogtreecommitdiffstats
path: root/doc/next.n
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2018-06-05 17:26:37 (GMT)
committerdgp <dgp@users.sourceforge.net>2018-06-05 17:26:37 (GMT)
commitf206e0fb4b6f73e30c7c0a8cb1560b548bae04ad (patch)
tree3112b680dfff3ea941ff1d624dd968ee881123b0 /doc/next.n
parent1545e3155786a2643bbabc7e7e5ef8b1a1d47d4a (diff)
parent3b14a4b0ed16f753791f2c6046b761c4fcd5be05 (diff)
downloadtcl-f206e0fb4b6f73e30c7c0a8cb1560b548bae04ad.zip
tcl-f206e0fb4b6f73e30c7c0a8cb1560b548bae04ad.tar.gz
tcl-f206e0fb4b6f73e30c7c0a8cb1560b548bae04ad.tar.bz2
merge 8.7
Diffstat (limited to 'doc/next.n')
-rw-r--r--doc/next.n5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/next.n b/doc/next.n
index db846be..8ebaed2 100644
--- a/doc/next.n
+++ b/doc/next.n
@@ -112,6 +112,7 @@ oo::class create theSuperclass {
puts "in the superclass, args = $args"
}
}
+
oo::class create theSubclass {
superclass theSuperclass
method example {args} {
@@ -121,6 +122,7 @@ oo::class create theSubclass {
puts "after chaining from subclass"
}
}
+
theSubclass create obj
oo::objdefine obj method example args {
puts "per-object method, args = $args"
@@ -167,6 +169,7 @@ oo::class create cache {
\fI# Compute value, insert into cache, and return it\fR
return [set ValueCache($key) [\fBnext\fR {*}$args]]
}
+
method flushCache {} {
my variable ValueCache
unset ValueCache
@@ -178,10 +181,12 @@ oo::class create cache {
oo::object create demo
oo::objdefine demo {
mixin cache
+
method compute {a b c} {
after 3000 \fI;# Simulate deep thought\fR
return [expr {$a + $b * $c}]
}
+
method compute2 {a b c} {
after 3000 \fI;# Simulate deep thought\fR
return [expr {$a * $b + $c}]