5 Replies Latest reply on Feb 21, 2009 9:06 PM by Gregory Lafrance

    How do I access xml data in the component file?

      I have a component file. It is a component under a DataGridColumn itemRenderer. Here is partial of my code:
      <mx:DataGrid dataProvider="{xmlData.lastResult.account.data}">
      <mx:DataGridColumn itemRenderer="checkedIndicator" />

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml">
      import mx.controls.Alert;

      private var test:Number = data.number; // doesn't work
      private function pop():void {
      <mx:Button click="pop()"/>
      <mx:TextInput text="{data.number}"/> //working

      The variable data.number in MXML can access my XML under TextInput, but cannot be access in my actionscript code under pop() function. Why is that?