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

    Compile Error - "Access of undefined property"

    Ed_Syrett Level 1

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


      <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...


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

      public var myDP:Array = [
      {label1:"P1", quantity:3},
      {label1:"P2", quantity:3}

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


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

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

      Any assistance gratefully received.