Hi,

This application when run displays “undefined” in text on the screen.

<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
                xmlns:js="library://ns.apache.org/flexjs/basic"
                xmlns:local="*">

    <js:valuesImpl>
        <js:SimpleCSSValuesImpl/>
    </js:valuesImpl>
    
    <js:initialView>
        <js:View percentWidth="100" percentHeight="100">
            <js:VContainer>
                <js:Label text="Here is some text" />
                <local:SimpleComponent />
            </js:VContainer>
        </js:View>
    </js:initialView>

</js:Application>

The component code:

<?xml version="1.0" encoding="utf-8"?>
<js:VContainer xmlns:fx="http://ns.adobe.com/mxml/2009";
                xmlns:js="library://ns.apache.org/flexjs/basic">
    
    <fx:Script><![CDATA[        
                [Bindable] public var text:String;
        ]]></fx:Script>

    <js:beads>
        <js:ContainerDataBinding />
    </js:beads>

    <js:Label text="{text}" />

</js:VContainer>

This can be worked around by doing this in the component:

    <fx:Script><![CDATA[        
                [Bindable] public var text:String = “";
        ]]></fx:Script>

But still looks like a bug / is unexpected behaviour to me. What do other 
people think?

Thanks,
Justin

Reply via email to