Popup and modules
Hi Alex,
Very good job and congratulations...
Just a remark relative to the new implementation of the PopupManager's methods taking an extra argument of IFlexModuleFactory to be able in case of multi-modules application to set styles from the module for popups, I guess your code in PopupBase should look something like :
//-------------------------------
// moduleFactory
//-------------------------------
/**
* IFlexModuleFactory to apply style from.
*/
[Bindable]
public var moduleFactory : IFlexModuleFactory;
/**
* Whether or not the popup is open. Setting this property to true
* triggers the opening of the popup. Setting it to false will close the
* popup. If the popup child view dispatches an Event.CLOSE event, the
* popup will also be closed and this property set back to false.
*/
private function openPopUp() : void
{
if ( !parent )
{
parent = DisplayObject( FlexGlobals.topLevelApplication );
}
child = getPopUp();
child.addEventListener( Event.CLOSE, onClose );
dispatchPopUpEvent( PopUpEvent.OPENING );
PopUpManager.addPopUp( child, parent, modal, childList, moduleFactory );
if ( center )
{
PopUpManager.centerPopUp( child );
}
dispatchPopUpEvent( PopUpEvent.OPENED );
dispatchShowEvent();
}
PS : hum.., should be great as well to have a namespace for cairngorm instead of private 😉
