2 Replies Latest reply on Jun 12, 2006 12:39 AM by Ed_Syrett

    Compile Error - "Access of undefined property"

    Ed_Syrett Level 1
      Hello,

      Firstly, here's the code that gives me a strange error and refuses to compile. The error occurs on line 20:

      quote:

      <mx:ComboBox dataProvider="{products}" />


      I find this error really strange as other samples in the help seem to suggest that this should work. Here's the rest of the code...

      quote:


      <?xml version="1.0"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" height="700" width="700">

      <mx:Script>
      <![CDATA[
      [Bindable]
      public var myDP:Array = [
      {label1:"P1", quantity:3},
      {label1:"P2", quantity:3}
      ];

      [Bindable]
      public var products:Array = [ {label:"P1", data:1},
      {label:"P2", data:2}, {label:"P3", data:3} ];

      ]]>
      </mx:Script>

      <mx:Component id="productList">
      <mx:ComboBox dataProvider="{products}" />
      </mx:Component>


      <mx:DataGrid id="myDG" dataProvider="{myDP}" variableRowHeight="true" editable="true">
      <mx:columns>
      <mx:DataGridColumn dataField="label1" headerText="Product Code" itemEditor="{productList}"/>
      <mx:DataGridColumn dataField="quantity" headerText="Quantity" editorDataField="value">
      <mx:itemEditor>
      <mx:Component>
      <mx:NumericStepper stepSize="1" maximum="50"/>
      </mx:Component>
      </mx:itemEditor>
      </mx:DataGridColumn>
      </mx:columns>
      </mx:DataGrid>
      </mx:Application>



      Any assistance gratefully received.

      Cheers,

      Ed.