FYI, it seems that ALL the styles that should be set aren't.  For example, style arrowButtonWidth in PopUpButton is 16, in my copy of the code it's NaN.  Now to try to figure out why that is...

On 7/28/06, Pan Troglodytes <[EMAIL PROTECTED]> wrote:
I'm trying to create my own PopUpButton that will fire an event BEFORE opening the dropdown list (so I can populate it dynamically).  Unfortunately, everything useful (like openWithEvent) is declare private and not protected.  So I thought the most elegant way would be to just copy the PopUpButton.as source and rename it and the class to PopUpButtonExt.  After commenting out the version include, I ran into a problem.  In calcArrowButtonSize(), there is this bit:

var popUpIconClass:Class = Class(getStyle("popUpIcon"));
popUpIcon = new popUpIconClass();        

In my variation, popUpIconClass is always null.  The source for PopUpButton.as says:

/**
 *  The icon used for the right button of PopUpButton.
 *  Supported classes are mx.skins.halo.PopUpIcon
 *  and mx.skins.halo.PopUpMenuIcon.
 *  @default mx.skins.halo.PopUpIcon
 */
[Style(name="popUpIcon", type="Class", inherit="no")]

I'm trying to understand why it would be ok in the original class and not in the class using the same code.  Is there some internal voodoo going on?  Suggestions for other ways I should do this are welcome, but not really the main point of my question.  I'd really like to understand why this breaks.

--
Jason



--
Jason __._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to