1 Reply Latest reply on Nov 7, 2010 11:36 PM by Flex harUI

    How to get the name of a function of the object of an ArrayCollection?

    giba_f Level 1

      Hello everyone!

      how to get a function parameter by the name of a column of the ArrayCollection and use that in place the "label"?

      Now appreciate the help: THANK YOU!

      Gilberto

       

       

       

      private

       

      function AxPesqui(_Item:int,_Chave:String,_PesCont:Boolean,_Array:ArrayCollection):int {

       

        var nRet:int = 0

        aColsSoli.sort =

        new Sort();

        aColsSoli.sort.fields = [

        new SortField( aOpcPesq.getItemAt( _Item ).campo , false, true) ];

        aColsSoli.refresh();

       

        for ( var i:int=0 ; i < _Array.length ; i++) {

       

           if ( _Array.getItemAt(i).label == _Chave ) {

               nRet = i;

       

               break;

           }

        }

       

        return nRet;

      }