Artifacts Associated With Ticket 57e44de76e
Ticket change [31b5928c23] (rid 142436) by venkat on 2015-07-05 20:07:16:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
=== start of a.tcl === proc ::stracer {junk var op} { if {$var == ""} return switch $op { r { puts "Read Fired" set ::a($var) 5 } w { puts "Write Fired" } } } trace variable ::a rw ::stracer # set a(test2) 5 puts "$a(test1)" === end of a.tcl === Running: % tclsh8.6 a.tcl can't read "a(test1)": no such variable while executing "puts "$a(test1)"" (file "a.tcl" line 17) Now remove the commented line (Remove # in "# set a(test2) 5) % tclsh8.6 a.tcl Write Fired Read Fired 5 ---- Why does the write to the array change the behaviour of the read trace? - foundin initialized to: "8.6.4"
- is_private initialized to: "0"
- login: "venkat"
- priority initialized to: "5 Medium"
- private_contact initialized to: "1fb8c275493b1f1dcf8db46d6d541794a011947f"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "venkat"
- subsystem initialized to: "07. Variables"
- title initialized to:
Array Read Trace fires only if Array has been written to
- type initialized to: "Bug"
Ticket change [b636a40753] (rid 142437) by venkat on 2015-07-05 21:49:07:
- foundin changed to: "8.6.4 296892a8fb4c0"
- login: "venkat"
- mimetype: "text/plain"
Ticket change [256220657c] (rid 142438) by venkat on 2015-07-05 23:33:15:
- icomment:
Instead of the write : "set a(test2) 5", even a "array set a [list]" makes it work. This might be a documentation issue rather than a code issue.
- login: "venkat"
- mimetype: "text/plain"
- icomment:
Ticket change [312bff4c87] (rid 142439) by ferrieux on 2015-07-06 17:05:02:
- icomment:
Yes: most likely the var must gain "array status" before the trace is set.
- login: "ferrieux"
- mimetype: "text/plain"
- icomment: