title: how to update global variable in titanium?
body: <p>i'm having some problem in updating my array which is global by the way.</p>
  
  <p>here is my code:</p>
  
  <pre><code>Ti.App.dinercolor=["#FF5A00","#007EFF","#dccdc0","#C2FF95","#A700FD","#dccdc0","#dccdc0","#5F9EA0","#dccdc0","#dccdc0","#22A000","#DCCDC0","#dccdc0","#FF003C","#dccdc0","#FF003C","#dccdc0","#22A000","#dccdc0","#FFF191"];
  </code></pre>
  
  <p>thats my global array which i can access data from it from anywhere in the application.</p>
  
  <p>the problem comes when i want to update the array like:</p>
  
  <pre><code>for(var q=0; q&lt;Ti.App.dinercolor.length; q++){Ti.App.dinercolor[q] = '#dccdc0';}    
  </code></pre>
  
  <p>so, the array i was expecting after the operation thats done is something like this:</p>
  
  <pre><code>Ti.App.dinercolor=["#dccdc0","#dccdc0","#dccdc0","#dccdc0","#dccdc0","#dccdc0","#dccdc0","#dccdc0","#dccdc0","#dccdc0","#dccdc0","#dccdc0","#dccdc0","#dccdc0","#dccdc0","#dccdc0","#dccdc0","#dccdc0","#dccdc0","#dccdc0"];
  </code></pre>
  
  <p>but somehow i'm getting the same array with out updating,</p>
  
  <pre><code>Ti.App.dinercolor=["#FF5A00","#007EFF","#dccdc0","#C2FF95","#A700FD","#dccdc0","#dccdc0","#5F9EA0","#dccdc0","#dccdc0","#22A000","#DCCDC0","#dccdc0","#FF003C","#dccdc0","#FF003C","#dccdc0","#22A000","#dccdc0","#FFF191"];
  </code></pre>
  
  <p>please help me out, i have no idea what i'm doing wrong here,</p>
  
  <p>Thank you,,</p>