Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: be9dc01892709f363ab29c31a440c126e8bd7089
Ticket: 2712377fffffffffffffffffffffffffffffffff
info vars doesn't show object variables correctly
User & Date: cnassau on 2009-03-25 18:52:56
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    The following script behaves badly:
    
        oo::class create test {
    variable foo bar
    method setvars {f b} {
        set foo $f 
        set bar $b
    }
    method dump1 {} {
        puts <1>
        foreach v [info vars *] {
    puts dump1:$v=[set $v]
        }
    }
    method dump2 {} {
        puts <2>
        foreach v [info vars *] {
    puts dump2:$v=[set $v]
        }
        puts foo=$foo
    }
        }
    
        test create stuff
        stuff setvars what ever
        stuff dump1
        stuff dump2
    
    The output is
    
       <1>
       <2>
       dump2:foo=what
       foo=what
    
    I would have expected that [info vars] returns both foo and bar in both dump methods.
    
  4. foundin changed to: "obsolete: 8.6b1.1"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "cnassau"
  10. subsystem changed to: "35. TclOO Package"
  11. title changed to: "info vars doesn't show object variables correctly"
  12. type changed to: "Bug"