title: titanuum mobile xmlmarkup events
body: <p>moving from actionscript (flex) to titanium and I'm experimenting with the xml markup. What I have is a template that I picked up from the doc</p>
  
  <pre><code>&lt;ItemTemplate name="template"&gt;
                      &lt;ImageView left="0" bindId="pic" id="icon" /&gt;
                      &lt;Label bindId="info" id="title"/&gt;
                  &lt;/ItemTemplate&gt;
  
              &lt;/Templates&gt;
  </code></pre>
  
  <p>my question is if someone clicks on the pic or a listitem itself, how does one handle the events. through xml markup? Then how do you reference any of the control wrap in the template?</p>
  
  <p>I have tried </p>
  
  <pre><code>&lt;ImageView left="0" bindId="pic" id="icon" onclick="doClick()" /&gt;
  
  
  function doClick(e) {
  
      alert($.info.text);
  }
  </code></pre>
  
  <p>This just produces a error and I still would not know what pic was clicked.</p>
  
  <p>any help would be great..</p>
  
  <p>thanks Mike</p>