Hi Jasom.

I noticed when I tried copying an entire framework class, instead of 
just extending,  that in addition to version, several other 
framework class references where required.  I suppose that if you 
placed your copy in the same directory as the original, it would 
work the same.  But, this isn't really practical.  I gave up on that 
approach and concentrated on subclassing instead.

-TH

--- In [email protected], "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
>







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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to