flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maurice Amsellem <maurice.amsel...@systar.com>
Subject FLEX-33806 and spark Alert implementation
Date Fri, 11 Oct 2013 01:20:00 GMT
Hi, while working on FLEX-33806 (changing the message top padding of experimental Alert),
I realized the implementation of this class was unnecessarily complex:

-           it derives from Panel (ok) and adds 3 skinParts (messageDisplay , iconDisplay,
and buttonGroup)

-          Defines its own skin class that monkey-patches PanelSkin, disables contentGroup,
 and adds the three skinParts laid out in two groups VGroup and HGroup.

-          Uses UIComponent to wrap the iconClass, and RichText to display the message.

I found it could be simplified that way:

-          Don't need a new skin,  default panel skin is fine.

-          Sets the icon and message directly in the class (not in the skin), so that they
go in the contentGroup, and set the layout accordingly (HorizontalLayout with padding)

o   Use BitmapImage for the icon, instead of the "UIComponent" wrapper.

o   Use s:Label for the message instead of RichText

-          Use controlBarContent to hold the Alert buttons

-          And finally, since there is no skinParts for messageDisplay and iconDisplay, push
the message text and icon class to the controls using the old fashioned invalidateProperties()
/ commitProperties() way.

What do you think?

Maurice Amsellem
SYSTAR R&D - BusinessBridgeFX

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message