Hi I am trying to compile and run the dropdownlist example, but the output
is not coming good.  Please take a look at the attached image.  Can you
tell me what needs to be done?

init:
   [delete] Deleting directory
C:\Users\ssivas01\workspace_desktop\sndb\DEPLOY
    [mkdir] Created dir: C:\Users\ssivas01\workspace_desktop\sndb\DEPLOY

flex:
     [exec] MXMLJSC
     [exec]
-sdk-js-lib=C:\Users\ssivas01\tools\apache-royale-0.9.8-bin-js\royale-asjs\js\bin\..\..\frameworks\js\Royale\generated-sources
     [exec] -source-path+=C:\Users\ssivas01\workspace_desktop\sndb/flex_src
     [exec]
-external-library-path+=C:/Users/ssivas01/tools/apache-royale-0.9.8-bin-js/royale-asjs/js/libs/js.swc
     [exec] -compiler.targets=JSRoyale
     [exec] -compiler.debug=false
     [exec] +configname=flex
     [exec] -output=DEPLOY
     [exec] -context-root=sndb
     [exec] -locale=en_US
     [exec]
-services=C:\Users\ssivas01\workspace_desktop\sndb/WebContent/WEB-INF/flex/services-config.xml
     [exec]
flex_src\flex\src\com\sprint\cbs\bky\views\administration\UserAdministration3.mxml
     [exec] -compiler.exclude-defaults-css-files=BasicJS.swc:defaults.css
     [exec] Nov 15, 2020 7:31:55 AM
com.google.javascript.jscomp.LoggerErrorManager println
     [exec] WARNING:
C:/Users/ssivas01/workspace_desktop/sndb/DEPLOY/bin/js-debug/mx/core/UIComponent.js:3242:
WARNING - Suspicious code. This code lacks side-effects. Is there a bug?
     [exec]   } else if ((this.mx_core_UIComponent__toolTip == null ||
this.mx_core_UIComponent__toolTip == "") &&
this.mx_core_UIComponent__toolTipBead != null) {
     [exec]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     [exec]
     [exec] Nov 15, 2020 7:31:55 AM
com.google.javascript.jscomp.LoggerErrorManager printSummary
     [exec] WARNING: 0 error(s), 1 warning(s), 98.3% typed
     [exec] The project 'UserAdministration3' has been successfully
compiled and optimized.
     [exec] 56.7791171 seconds
     [exec]
C:\Users\ssivas01\workspace_desktop\sndb\flex_src\flex\src\com\sprint\cbs\bky\views\administration\UserAdministration3.mxml(64):
col: 88 Warning: Data binding will not be able to detect assignments to
'label'.
     [exec]
     [exec]                     <s:Label fontSize="14" color="0x336699"
text="The price of item: {list2.selectedItem.label} is:
${list1.selectedItem.data}"
     [exec]
                                         ^
     [exec]
     [exec]
C:\Users\ssivas01\workspace_desktop\sndb\flex_src\flex\src\com\sprint\cbs\bky\views\administration\UserAdministration3.mxml(64):
col: 120 Warning: Data binding will not be able to detect assignments to
'data'.
     [exec]
     [exec]                     <s:Label fontSize="14" color="0x336699"
text="The price of item: {list2.selectedItem.label} is:
${list1.selectedItem.data}"
     [exec]
                                                                         ^
     [exec]

copy:
     [copy] Copying 3 files to
C:\Users\ssivas01\tools\apache-tomcat-6.0.18\webapps\sndb

all:

BUILD SUCCESSFUL
Total time: 59 seconds


MXML:
<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009";

               xmlns:s="library://ns.apache.org/royale/spark"
               xmlns:mx="library://ns.apache.org/royale/mx"
               width="100%" height="100%">

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

            [Bindable]
            public var depts:ArrayCollection = new ArrayCollection([
                {label:"Electronics", data:1},
                {label:"Home Goods", data:2},
                {label:"Toys", data:3} ]);

            [Bindable]
            public var elecItems:ArrayCollection = new ArrayCollection([
                {label:"Samsung 25in TV", data:299},
                {label:"Panasonic Plasma", data:999},
                {label:"Sony LCD", data:899} ]);

            [Bindable]
            public var homeItems:ArrayCollection = new ArrayCollection([
                {label:"Blendtec Blender", data:399},
                {label:"Hoover Vaccuum", data:599},
                {label:"Black & Decker Toaster", data:99} ]);

            [Bindable]
            public var toyItems:ArrayCollection = new ArrayCollection([
                {label:"Nintendo DS", data:120},
                {label:"Lego's Star Wars Set", data:50},
                {label:"Leapfrog Leapster", data:30} ]);

            private function
handleDepartmentSelected(event:IndexChangeEvent):void
            {
                //list2.prompt="Select Item";
                list2.selectedIndex=-1; // reset so prompt shows
                if (list1.selectedIndex==0)
                    list2.dataProvider=elecItems;
                else if (list1.selectedIndex==1)
                    list2.dataProvider=homeItems;
                else if (list1.selectedIndex==2)
                    list2.dataProvider=toyItems;

            }

        ]]>
    </fx:Script>

    <s:Panel title="DropDownList Sample" width="100%" height="100%">

        <s:VGroup width="100%" height="100%" left="120" top="5">
            <s:Label text="RJ's Warehouse Price Checker" fontSize="18" />
            <s:DropDownList id="list1" width="50%" dataProvider="{depts}"
labelField="label"
                            prompt="Select Category"
                            change="handleDepartmentSelected(event)"/>
            <s:Label id="text2"/>
            <s:DropDownList id="list2" width="50%" labelField="label" prompt
="None"/>
            <mx:Spacer height="10"/>
            <s:Label fontSize="14" color="0x336699" text=
"The price of item: {list2.selectedItem.label} is: ${list1.selectedItem.data}"

                verticalAlign="bottom"/>



        </s:VGroup>

    </s:Panel>

</mx:Application>

Reply via email to