Artifacts Associated With Ticket 2712377
Ticket change [be9dc01892] (rid 102102) by cnassau on 2009-03-25 18:52:56:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized 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. - foundin initialized to: "obsolete: 8.6b1.1"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "cnassau"
- subsystem initialized to: "35. TclOO Package"
- title initialized to: "info vars doesn't show object variables correctly"
- type initialized to: "Bug"
Ticket change [42c09b3d65] (rid 116436) by cnassau on 2009-03-27 02:36:31:
- icomment:
Here's another script that behaves strangely with respect to object variables: oo::class create test { variable foo constructor {foo} { set bar $foo unset foo my variable foo set foo $bar } method dump {} { puts foo=$foo } } test create FOO BAR FOO dump Here "unset foo" fails with "can't unset "foo": no such variable". If that line is commented out the error becomes "variable "foo" already exists" from "my variable foo". I would have hoped that "FOO dump" produces "foo=BAR" in the end. Again this report refers to CVS head (which identifies itself as 8.6b1.1 with TclOO 0.6.1). - login: "cnassau"
- mimetype: "text/plain"
- username: "cnassau"
- icomment:
Ticket change [7058b1695c] (rid 100465) by dkf on 2009-04-17 17:02:44:
- icomment:
The issue is that declared variables that aren't used aren't actually brought into the context. (That's how variable resolvers work.) Arguably the problem is that [info vars] doesn't do a nice job with resolvers in place, and not that TclOO "doesn't work".
- login: "dkf"
- mimetype: "text/plain"
- subsystem changed to: "07. Variables"
- username: "dkf"
- icomment:
Ticket change [b4490450ac] (rid 125003) by dkf on 2009-11-27 13:44:45:
- priority changed to: "6"
Ticket change [e69c9fbc3e] (rid 104320) by dkf on 2012-04-10 00:06:01:
- closedate changed to: "2012-04-09T17:06:01"
- closer changed to: "dkf"
- icomment:
allow_comments - 1 Fixed for 8.6; will not backport fix to 8.5 (really a Tcl introspection/resolver issue; can't fix from a package).
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"