Skip to main content
Participant
Jun 21, 2010 2:21 PM UTC
Answered

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 😉

This topic is closed to new replies. Start a new post to keep the conversation going.
Alex UhlmannCorrect answer
Participating Frequently
Jun 22, 2010 6:58 PM UTC

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

3 replies

Alex UhlmannCorrect answer
Participating Frequently
Jun 22, 2010 6:58 PM UTC

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

Translate
Participant
Jun 23, 2010 1:28 PM UTC

Great Alex,

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

Thank's a lot.

Translate
Anthony.R
Participant
Aug 24, 2010 1:58 PM UTC

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.

Translate