| Ticket UUID: | d06b029d9d0fc9e68288f1a4f5b8635016fdb905 | ||
| Title: | documentation: oo::define instead of oo::objdefine in example for next | ||
| Type: | Bug | Created on: | 2015-07-27 14:17:17 |
| Submitter: | peterlewerin | Assigned to: | dkf |
| Subsystem: | 35. TclOO Package | Severity: | Minor |
| Priority: | 5 Medium | Last modified: | 2015-08-18 12:50:59 |
| Status: | Closed | Closed by: | dkf |
| Resolution: | Fixed | Closed on: | 2015-08-18 12:50:59 |
| Version: | 8.6.4 | ||
| Description: | ||||
|
In the documentation for Corrected code:
oo::objdefine obj method example args {
puts "per-object method, args = $args"
next x {*}$args y
next
}
and
oo::objdefine demo {
mixin cache
method compute {a b c} {
after 3000 ;# Simulate deep thought
return [expr {$a + $b * $c}]
}
method compute2 {a b c} {
after 3000 ;# Simulate deep thought
return [expr {$a * $b + $c}]
}
}
| ||||
| User Comments: | ||||
dkf added on 2015-08-18 12:48:12:
Silly mistake on my part. Might date from when there was no separate oo::objdefine command and oo::define would just magically "do the right thing". | ||||
