Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 4f0e1a8d5868fba55880cd2470003e8eb4a4d951
Ticket: d06b029d9d0fc9e68288f1a4f5b8635016fdb905
documentation: oo::define instead of oo::objdefine in example for next
User & Date: peterlewerin on 2015-07-27 14:17:17
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    In the documentation for <code>next</code>, in the first example <code>oo::define</code> is called to configure the <code>obj</code> object: this should be <code>oo::objdefine</code>. Similarly in the second example, the <code>demo</code> object is configured using <code>oo::define</code> instead of <code>oo::objdefine</code>.
    
    Corrected code:
    
    <verbatim>
    oo::objdefine obj method example args {
        puts "per-object method, args = $args"
        next x {*}$args y
        next
    }
    </verbatim>
    
    and
    
    <verbatim>
    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}]
        }
    }
    </verbatim>
    
  5. foundin changed to: "8.6.4"
  6. is_private changed to: "0"
  7. login: "peterlewerin"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Minor"
  11. status changed to: "Open"
  12. submitter changed to: "peterlewerin"
  13. subsystem changed to: "35. TclOO Package"
  14. title changed to:
    documentation: oo::define instead of oo::objdefine in example for next
    
  15. type changed to: "Bug"