title: Tcl/Tk - can't read "UserArray": variable is array
body: <p>I am using ActiveState's TclDevKit debugger to look through my code but at one point in the execution of the program I get the following error: </p>
  
  <pre><code>can't read "UserArray": variable is array
      while executing
  "set UserArray"
      ("uplevel" body line 1)
      invoked from within
  "DbgNub_uplevelCmd DbgNub_uplevelCmd $args"
      invoked from within
  "uplevel 1 [list set $name]"
      (procedure "DbgNub_TraceVar" line 53)
      invoked from within
  "DbgNub_TraceVar 1 array UserArray time1_satOTRS1,2 w"
      (write trace on "UserArray(time1_satOTRS1,2)")
      invoked from within
  "set UserArray($item,$window) $profile_array($item)"
  </code></pre>
  
  <p>This error utterly baffles me because as I understand Tcl/Tk, what I am doing is completely valid and legal. The code goes: </p>
  
  <pre><code>foreach item [array names profile_array] {
      set UserArray($item,$window) $profile_array($item)
  }
  </code></pre>
  
  <p>In Tcl one is allowed to read from and write to an index in an array, I don't think there should be an error here... Am I missing some detail? </p>