Yes, thanks Pratyoosh for looking into this and helping out!
I could imagine someone wanting to make a custom pop-up by doing something
like:
<basic:Container>
<basic:beads>
<basic:NonVirtualVerticalLayout />
<basic:PopupBead />
</basic:beads>
Š
</basic:Container>
(but maybe in ActionScript) so having popup-ability be a good would be a
good thing. But a lot of controls wouldn't make sense (e.g., ButtonBar) on
their own. I was wondering if the PopUpBead would just ignore a strand
that didn't implement IContainer.
--peter
On 10/22/13 12:18 AM, "Alex Harui" <[email protected]> wrote:
>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.
>
>Thoughts?
>
>Thanks again for contributing.
>
>-Alex
>
>
>On 10/21/13 2:29 PM, "Alex Harui" <[email protected]> wrote:
>
>>Hi Pratyoosh,
>>
>>I will take a look this evening.
>>
>>Thanks,
>>-Alex
>>
>>On 10/21/13 1:46 PM, "Sharma, Pratyoosh" <[email protected]>
>>wrote:
>>
>>>Made updates for a popup implementation, it supports arbitrary popup
>>>content similar to flex.
>>>
>>>Example
>>> 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.
>>>
>>>Thanks,
>>>Pratyoosh
>>>
>>>
>>>
>>>
>>>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
>>>http://www.jpmorgan.com/pages/disclosures/email.
>>
>