Click here to Skip to main content
14,732,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello! I use example code from Flex tutorial:

<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the Spark DropDownList control -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

    xmlns:s="library://ns.adobe.com/flex/spark"

    xmlns:mx="library://ns.adobe.com/flex/mx">

    <fx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;
            import spark.events.IndexChangeEvent;

         [Bindable]
            public var myDP:ArrayCollection = new ArrayCollection(
                [ {product:"Flex", price:100},
                  {product:"Air", price:200},
                  {product:"Catalyst", price:300},
                  {product:"FlashBuilder", price:400} ]);

            private function updateSelection(e:IndexChangeEvent):void
            {
                currSel.text = "Current Product = " + myDDL.selectedItem.product;
                currPrc.text = "Price = $" + myDDL.selectedItem.price;
            }
        ]]>
    </fx:Script>

    <s:Panel width="75%" height="75%" title="My DropDownList Example"

        horizontalCenter="0" verticalCenter="0">

        <s:VGroup left="10" right="10" top="10" bottom="10">

            <!-- Text components used to display current selection and price -->
            <s:Label id="currSel" text="Current Product = -"/>
            <s:Label id="currPrc" text="Price = $ -"/>

            <!-- DropDownList will call the updateSelection function when the
            selectionChanged event is dispatched -->
            <s:DropDownList id="myDDL" prompt="Select One"

                width="200" dataProvider="{myDP}"

                labelField="product"

                change="updateSelection(event);"/>

        </s:VGroup>

    </s:Panel>

</s:Application>


This get me one error:

Severity and Description    Path    Resource    Location    Creation Time   Id
Could not resolve <s:Application> to a component implementation.    LABAMENU/src    LABAMENU.mxml   line 4  1370013049718   77


How to fix it? May be i have any version flex? I know Flex only 3 days and dont understanв such such subtleties
Posted

1 solution

Hi,

Which version of flex you are using?use latest version Flex 4 or above.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900