Artifacts Associated With Ticket 218782ffffffffffffffffffffffffffffffffff
Ticket change [d1ac289e57] (rid 113395) by nobody on 2000-10-26 01:05:17:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 2110 Bug Version: 8.1 SubmitDate: '1999-05-20' LastModified: '2000-01-20' Severity: LOW Status: Released Submitter: pat ChangedBy: ericm OS: All FixedDate: '2000-01-20' FixedInVersion: 8.3 ClosedDate: '2000-01-20' Name: Greg Orchard ReproducibleScript: proc update {name index op} { puts "name $name index $index" } proc getUpdate {inVar} { upvar $inVar localVar set localVar 100 } trace variable somevar w update getUpdate somevar(1) ObservedBehavior: The output from the above is: name localVar index DesiredBehavior: I would expect to see: name somevar index 1 since "somevar" is the one variable being traced. This is actually the designed behaviour. While it may seem obivously incorrect, consider the case in which there are two levels of upvar, and multiple traces: proc update {name index op} { puts "name $name index $index" } proc getUpdate {inVar} { upvar $inVar localVar trace variable localVar w update getUpdate2 localVar } proc getUpdate2 {inVar} { upvar $inVar localVar2 set localVar2 100 } trace variable somevar w update getUpdate somevar Now it is not so clear what the behaviour should be. Which trace should fire? what name should it be given? If there are many levels of indirection, it could be costly to try and determine which trace should be fired with which variable name. And because all of the variable names actually refer to the same object, it is least confusing to fire all of the traces with the name used to trigger the trace. - eric -- 01/20/2000 ericm - foundin initialized to: "obsolete: 8.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "07. Variables"
- title initialized to: "trace variable / upvar problem"
- type initialized to: "Bug"
Ticket change [6bfeb875f7] (rid 128424) by welch on 2000-10-26 08:29:14:
- closedate changed to: "2000-10-26T01:29:14"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"