Skip to main content
Participant
June 21, 2010
Answered

Popup and modules

  • June 21, 2010
  • 1 reply
  • 1445 views

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 😉

This topic has been closed for replies.
Correct answer Alex Uhlmann

Excellent point, DoubleFx. I just comitted a fix for this basically following your suggestion but adding Flex 3/Flex 4 support via conditional compilation.

1 reply

Alex UhlmannCorrect answer
Participating Frequently
June 22, 2010

Excellent point, DoubleFx. I just comitted a fix for this basically following your suggestion but adding Flex 3/Flex 4 support via conditional compilation.

Participant
June 23, 2010

Great Alex,

As soon as you put it in the repo, we'll use it.

Thank's a lot.

Anthony.R
Participant
August 24, 2010

Have you used the new moduleFactory property in PopupBase yet?  I've been playing around with it this week but have been unable to get it to work correctly.