Hi, I'm working this days in a PopUp component that puts some content (defined in CSS or in MXML) in a PopUp. The component is now working a near to be finished, just need to solve few issues.
What I'm not sure is about content life cycle. Should the content be removed when close the popup and be recreated from scratch when open again? Or should the content be responsible of reset the its state if needed. Since the content can be defined in CSS through like this: .somePopUpContent { IPopUp: ClassReference("components.SomePopUpContent") } and then <j:PopUp id="popup1" className="somePopUpContent" modal="true"/> or in MXML: <j:PopUp id="popup2"> <c:FormExample label="Form example in a PopUp"/> </j:PopUp> In the MXML case you can eventually has bindings, so I think recreating from scratch does not seems a good idea. the Alert is another case of pop up, but since it use to be a text and just some buttons, does not seems to be affected by this problems, and each time is recreated. This kind of popup that can be modal or non modal, seems to be more like any other content that is navigated in other components, and those components just show/hide the content. By definition a modal/non-modal window is just a child of the interface that is shown in front of the rest of the application, so my bet is not to deal with recreation and just left as it's now. So if the user needs to reset the form state, is the user who need to create some reset functions and call it when the popup is open again if he needs that. -- Carlos Rovira http://about.me/carlosrovira