Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: bef42a2a34d80e2e117cf6166cfbccfed398f4df
Ticket: 2969488fffffffffffffffffffffffffffffffff
trace variable doesn't fire if you upvar to an array element
User & Date: twylite on 2010-03-12 23:35:55
Changes

  1. icomment:
    I don't know what the impact is on ::env.  IMHO ::env should be changed to a command [env] or similar and not managed as a variable, but that's a different discussion.
    
    If there are conditions under which a traced variable can change without the trace being invoked the whole value of trace is undermined.  I can't rely on it, and must change the application's design not use this behaviour.
    
    I can use a number of useful tricks if my UI widgets link to elements in an array (e.g. setting up defaults, loading/saving records, reverting changes all become trivial).  With certain UIs I may have to rethink that strategy as I cannot use [trace] to protect the consistency of the variables or the UI as a whole.
    
    
  2. login: "twylite"
  3. mimetype: "text/plain"
  4. username: "twylite"