Hi there... say I have a component like:

<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml"; layout="vertical">

<mx:Script>
                <![CDATA[
                        [Bindable]
                        public var theState:State;

                        public function chState():void {
                                currentState = theState
                        }
                ]]>
        </mx:Script>

        
<mx:Button id="submitBtn" label="Logon" click="chState()"/>

</mx:Panel>

And I want to add a custom state when this component is used:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";  
layout="absolute" xmlns:ns1="*">

<ns1:MyComponent theState="someState" />

</mx:Application>

How would i do this? My issues are obviously that the types do not  
match (String VS State).

What is the best way to do this?

DNK

Reply via email to