Yeah, that's what I did with the PopUpIcon style, then realized it was all the styles introduced in PopUpButton that were missing.  I could hack it in, but I still don't understand why PopUpButton doesn't have to hack it in.  I really wish someone from Adobe would actually respond...

On 8/2/06, Jeremy Lu <[EMAIL PROTECTED]> wrote:

yap, a pretty dirty hack, but you could always declare all the styles needed in your component.




On 8/2/06, Pan Troglodytes <[EMAIL PROTECTED] > wrote:

Thanks Jeremy, it's a decent hack.  Of course, you have to put an unused popupbutton in your app to make it work.  Still wishing I could make my popupbutton like the other naturally.



On 7/31/06, Jeremy Lu <[EMAIL PROTECTED]> wrote:

Try this:

StyleManager.setStyleDeclaration("PopUpButtonExt",  StyleManager.getStyleDeclaration("PopUpButton"), true);

this will get all the styles from PopUpButton to your extended component.


Jeremy.




On 8/1/06, Tim Hoff <[EMAIL PROTECTED]> wrote:

Yeah,

That's what I was trying to say. The default assets and styles are
in different framework classes (like mx.skins.halo), unless you
override them with CSS. I think if you set the missing properties
in your CSS file, you should be able to get it to work, but it might
be very tedious.



-TH

--- In flexcoders@yahoogroups.com, "Pan Troglodytes"
<[EMAIL PROTECTED]> wrote:
>
> Well, in this case there are only a couple of imports that I had
to make.
> The problem seems to be in getting this icon. Not sure what to
make of
> that.
>
> On 7/29/06, Tim Hoff <[EMAIL PROTECTED]> wrote:
> >
> > 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 flexcoders@yahoogroups.com, "Pan Troglodytes"
> > <chimpathetic@> 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
> >
> >
> >
> >
> >
> >
> >
> >
>
>
> --
> Jason
>





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