2 Replies Latest reply on Aug 24, 2008 3:45 PM by justria

    Problem with Arrays

      Hi all,
      How can I get the getters and setters for elements of an array.

      I have an array "col" of length 12
      the values of the array are col[0] , col[1],col[2]......col[11]
      How can I generate the getters and setters for the values of this array
      something like

      public function get col[0]():String
      return this.col1Field;

      public function set col[0](value:String):void
      this.col1Field = value;

      It gives an error when I try to do the above way
      I need to generate the getters and setters for each of the array value (col[]) because I am using it in the dataFied of the dataGrid as col[1] ..
      Can any one help me on this

      This is the code of the getters and setters (for the array -tht gives an error)

      My datagrid (this is where I am using the array value is in this way)
      <mx:DataGrid >
      <mx:DataGridColumn dataField="colValue[1]" headerText="2" width="20" rendererIsEditor="true" editorDataField="colValue[1]" itemRenderer="renderer.buttonRendererCol2"/>