1 Reply Latest reply on Mar 15, 2012 2:10 PM by Zolotoj

    Error while migrating to Flex 4.5.1 (1067: Implicit coercion of a value...)

    lee704 Level 1

      I am getting the following error while migrating my application from Flex 3.6 to Flex 4.5.1:

       

      1067: Implicit coercion of a value of type __AS3__.vec:Vector.<Object> to an unrelated type Array.

       

      The error is thrown on the following piece of code:

       

      var list:ArrayCollection=new ArrayCollection(dgSoftwareTitles.selectedItems);

       

      dgSoftwareTitles is defined as:

       

      <s:DataGrid id="dgShareCategoryForTransfer"

      x="34"

      y="369"

      requestedRowCount="5"

      width="90%"

      selectedIndex="-1"

      selectionMode="multipleRows">

      <s:columns>

      <s:ArrayList>

      <s:GridColumn headerText="SoftwareTitle"

      dataField="idSoftware"

      visible="false"/>

      <s:GridColumn headerText="SoftwareName"

      dataField="softwareName"

      visible="false"/>

      ...more GridColumns

      </s:columns>

      </s:ArrayList>

      </s:DataGrid>

       

      Any ideas why this would trow the "1067: Implicit coercion of a value of type __AS3__.vec:Vector.<Object> to an unrelated type Array" error?

       

      Thanks!

      Lee