I have a number of modules that use the PopupWrapper component. Since moving to Flex 4 I have noticed that my styles, which are also loaded form a module in the shell application, are not being applied. In order to solve this problem I need to pass a moduleFactory to the PopupWrapper. This is where I'm running into issues.
Since moduleFactory isn't bindable I can't simple pass it into PopupWrapper in my MXML. My next approach was to use a behaviour and apply the moduleFactory during the opening event but by then it is too late. Next, I decided to listen to changes to the parent property in my behaviour and when it changed I could apply the moduleFactory. After debugging this solution I discovered moduleFactory was still null. Finally, I tried extending PopupWrapper in order to set moduleFactory during the getPopup function. Doing this also resulted in moduleFactory being null.
Has anyone been successful in passing a moduleFactory to PopupWrapper in order to allow styles to be applied properly?