2 Replies Latest reply on Nov 27, 2010 10:50 AM by Arnoud Bos

    Flex 4.1 with flex 3.5 SWFLoader breaks PopupManager (marshaling plan bug?)

    Arnoud Bos Level 1



      I'm building a prototype application making use of the nested SWFLoader. That loader needs to open a popup (An alert).

      Unfortunately this gives a null pointer...


      And yes I included the Popupmanager in the host application. The SWFLoader is loaded in a sandbox (loadForCompatibiliy=true, trustContent=false)


      The error i get is in


      public function addPopUp(window:IFlexDisplayObject,



                            modal:Boolean = false,

                            childList:String = null,

                            moduleFactory:IFlexModuleFactory = null):void



      here:     if (window is IUIComponent)


                  IUIComponent(window).isPopUp = true;


      gives: Main Thread (Suspended: TypeError: Error #1009: Cannot access a property or method of a null object reference.)






      and the debugger shows me that window is an alert instance. So the casting goes wrong.


      What i also see is that FlashBuilder debugs

      the flex 4.1 popupmanager even though the Sub app (3.5 swf) is loaded via SWFLoader in a sandbox!  (loadForCompatibiliy=true, trustContent=false)


      But even if it was not loaded in a sandbox the Marshaling plan should work because loadForcompatibility is set to true...


      Any clues?


      If someone is interested i can put a .zip of the project online...