Hi,

This code:

<?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">

    <fx:Script><![CDATA[
        import org.apache.flex.html.SimpleAlert;
        ]]></fx:Script>

    <js:initialView>
        <js:View>
            <js:TextButton text="Click Me" click="SimpleAlert.show('hello 
world', this)" />
        </js:View>
    </js:initialView>

</js:Application>

Gives an error when the show method is called.

Uncaught TypeError: Cannot read property 'show' of undefined

It looks to be that SimpleAlert is not added with goog.require and 
org.apache.flex.html doesn’t contain SimpleAlert but only contains Button, 
ButtonBase and TextButton for the above code.

How can you force it to be added?

I looked at the Alert and SimpleAlert examples as well and they also failed in 
the same way,

Thanks,
Justin

Reply via email to