开发者

Flex spark component implementation error

Hi I am having this error when I try to paste in code of a spark component. The component is a DataGrid and it needs to be a spark and not a mx.

The Spark Component:

    <s:DataGrid includeIn="admin" x="150" y="288" requestedRowCount="4">
    <s:columns>
        <s:ArrayList>
            <s:GridColumn dataField="dataField1" headerText="Column 1"></s:GridColumn>
  开发者_StackOverflow中文版          <s:GridColumn dataField="dataField2" headerText="Column 2"></s:GridColumn>
            <s:GridColumn dataField="dataField3" headerText="Column 3"></s:GridColumn>
        </s:ArrayList>
    </s:columns>
    <s:typicalItem>
        <fx:Object dataField1="Sample Data" dataField2="Sample Data" dataField3="Sample Data"></fx:Object>
    </s:typicalItem>
    <s:ArrayList>
        <fx:Object dataField1="data1" dataField2="data1" dataField3="data1"></fx:Object>
        <fx:Object dataField1="data2" dataField2="data2" dataField3="data2"></fx:Object>
        <fx:Object dataField1="data3" dataField2="data3" dataField3="data3"></fx:Object>
        <fx:Object dataField1="data4" dataField2="data4" dataField3="data4"></fx:Object>
    </s:ArrayList>
</s:DataGrid>

The Error:

Could not resolve <s:DataGrid> to a component implementation.

How can I resolve this error. I need to make my DataGrid into a Spark Component. Thanks in advance.


The Spark DataGrid was introduced in Flex 4.5 . This error means two things:

  1. You are using an old version of the SDK, in which the Spark DataGrid does not exist.
  2. You are using the correct version of the SDK, but for some reason deleted, or changed the name of the 's' namespace import; thereby leading the compiler to not be able to find any components in the 's' namespace.

If you post the line for your top level component, we could eliminate option 2 easily.


Right click the project -> Properties -> Flex Compiler -> Use a specific sdk = 4.6(or whatever Higher SDK you have).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜