I am unsuccessfully trying to pass an integer constant to a custom
integer attribute of a custom component.  Confused yet?  Here's an
example of what I am trying to do:

Application:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; width="700"
height="250" borderStyle="solid"  xmlns:ns1="*">
        <ns1:myComponent supportsMultiselect="true"
supportTypeMask="{myComponent.TYPE_MASK_TEXT}"/>
</mx:Application>

MyComponent:
<?xml version="1.0" encoding="utf-8"?>
<mx:Button xmlns:mx="http://www.adobe.com/2006/mxml";>
        <mx:Script>
                <![CDATA[
                        public static const TYPE_MASK_ALL:int = -1;
                        public static const TYPE_MASK_NONE:int = 0;
                        public static const TYPE_MASK_IMAGE:int = 1;
                        public static const TYPE_MASK_TEXT:int = 2;
                        public static const TYPE_MASK_SPRITE:int = 4;
                
                        public var supportsMultiselect:Boolean;
                        public var supportTypeMask:int;
                ]]>
        </mx:Script>
</mx:Button>


The public var supportTypeMask is never getting set for some reason if
I try to pass it one of the constants.  If I pass "2" instead of
"{myComponent.TYPE_MASK_TEXT}" it works great.

Any ideas about what I am doing wrong here?

Thanks for your help!

Reply via email to