Vector array variables created in a proc are created in the global scope instead of in the proc scope. This is new RBC code, and is incompatible with the BLT implementation, which correctly created the array variables in the proc scope.
proc addTrace {graph} {
vector create xvec yvec
$graph create element newtrace -xdata xvec -ydata yvec
for {set i 0} {$i<10} {incr i} {
# this code is correct and should work
set xvec(++end) $i
set yvec(++end) $i
# this code is incorrect but does work with RBC 0.1
set:: xvec(++end) $i
set ::yvec(++end) $i
}
}