Artifacts Associated With Ticket 3603695fffffffff
Ticket change [30931ce69a] (rid 93280) by taylor_venable on 2013-02-07 12:04:39:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
When using oo::object's varname method on an object within the context of another object's method, [$other varname x] returns as if invoked as [my varname x]. Changing the context (e.g. by using [uplevel #0 $other varname x]) returns the correct result. Example code and output attached. Tcl Version: 8.6.0 TclOO Version: 1.0 OS Platform & Version: Linux 3.5.7
- foundin initialized to: "current: 8.6.0"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "taylor_venable"
- subsystem initialized to: "35. TclOO Package"
- title initialized to:
TclOO: varnames incorrect when used from other object method
- type initialized to: "Bug"
Add attachment "test.tcl" [3b55280ed6] (rid 112720) by taylor_venable on 2013-02-07 19:04:40.
Ticket change [12e96e69d1] (rid 124129) by taylor_venable on 2013-02-07 19:04:40:
- icomment:
File Added - 460258: test.tcl
- login: "taylor_venable"
- mimetype: "text/plain"
- username: "taylor_venable"
- icomment:
Ticket change [c4ae95523c] (rid 111882) by dkf on 2013-02-08 21:00:58:
- icomment:
The 'variable' declaration is critical to the problem, as the test case I'm working on (see below) succeeds without it and fails with it. Very strange! test oo-19.3 {OO: varname method and variable decl: Bug 3603695} -setup { oo::class create testClass { variable foo export varname constructor {} { variable foo x } method bar {obj} { my varname foo $obj varname foo } } } -body { testClass create A testClass create B lsearch [list [A varname foo] [B varname foo]] [B bar A] } -cleanup { testClass destroy } -result 0 - login: "dkf"
- mimetype: "text/plain"
- priority changed to: "8"
- username: "dkf"
- icomment:
Ticket change [b2fde8c735] (rid 98439) by dkf on 2013-02-09 19:32:28:
- closedate changed to: "2013-02-09T12:32:28"
- closer changed to: "dkf"
- icomment:
allow_comments - 1 Fixed for the next release of Tcl 8.6; will also apply to TclOO package for its future releases.
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"