flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: [FlexJS] PopUp implementation
Date Tue, 22 Oct 2013 04:18:07 GMT
Hi Pratyoosh,

Thanks for working on this stuff, especially the modal and dragging beads.
 I got a chance to look through your popup class.  It looks pretty good to
me, especially for those who are used to the current Flex SDKs'
PopUpManager.  I did wonder whether PopUp should inherit from Panel.  What
are your thoughts on that?

One thing I'd like to discuss is the change to have Alert extend PopUp and
how that relates to FlexJS's composition vs inheritance debate.  I"m not
sure there's a right answer, but we originally chose to implement the
FlexJS Alert as a "control" instead of a "container" because then it's API
surface doesn't include container APIs like addElement/removeElement.  The
Alert's view and layout are expecting to manage a known set of children,
not some arbitrary set of things that could be added to a container.  The
current Flex SDK inheritance for Alert is TitleWindow->Panel and the
FlexJS Alert could have inherited from Panel, but our thinking was that it
should be more of a "control" and compose a Panel-like view.

And then, if you can popup a control, then the temptation is to implement
popup as a thing you compose instead of inherit.  I haven't actually tried
it so there could certainly be a flaw in that logic.  You would still have
a PopUp class that bakes in a composited popup functionality into a
container, but under the covers, it is baking in the same code that an
Alert control or other control that popups would composite as well.  And
there might not be a whole lot in there, either.  It could just be a
marker that some other entity watches the host app for and manages the
z-order appropriately.


Thanks again for contributing.


On 10/21/13 2:29 PM, "Alex Harui" <aharui@adobe.com> wrote:

>Hi Pratyoosh,
>I will take a look this evening.
>On 10/21/13 1:46 PM, "Sharma, Pratyoosh" <pratyoosh.sharma@jpmorgan.com>
>>Made updates for a popup implementation, it supports arbitrary popup
>>content similar to flex.
>>                        var demoPopUp:PopUp =
>>PopUp.createPopUp(PopupContent,this,"Component Popup Test", true, true);
>>                        demoPopUp.centrePopup();
>>Supports modal behavior & drag using titlebar, z-order for multiple
>>popups & tabbing focus management has yet to be implemented. Alert now
>>subclasses from Popup. This implementation is only for js, corresponding
>>Actionscript implementation is TBD.
>>Sample application & code attached on
>>https://issues.apache.org/jira/browse/FLEX-33743 .
>>Had to make a small tweak to closure code due to a compiler defect
>>(https://issues.apache.org/jira/browse/FLEX-33837), once the code on the
>>compiler is fixed this patch on closure won't be needed.
>>Alex or Peter, would love some feedback.
>>This email is confidential and subject to important disclaimers and
>>conditions including on offers for the purchase or sale of securities,
>>accuracy and completeness of information, viruses, confidentiality, legal
>>privilege, and legal entity disclaimers, available at

View raw message