When we create a pop up and add it using the PopUpManager, the pop up remains on the screen even when we navigate to a different Panel or View all together. Is there something special that needs to be done when using PopUps in CAF Tiles?
Yes. The problem is that the PopUpManager uses the top-most Flex application to draw the popup, but uses getSandboxRoot() when removing it. When using getSandboxRoot() the Gravity root is used. Gravity is the framework on which Composite Application Framework runs and the top level for it is called a bootstrap loader, a Gravity-specific SWF. If you use a Flex application as the root tile, this tile is loaded into the Gravity movie.
To get around this use Application.application.parent as the parent for PopUpManager.createPopUp() or PopUpManager.addPopUp().
No dice, here's the Flash Player error we received:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.accessibility::AccImpl$/http://www.adobe.com/2006/flex/mx/internal::getDefinition()[E:\dev\hero_private\frameworks\projects\framework\src\mx\accessibil ity\AccImpl.as:250]
at mx.accessibility::AccImpl$/http://www.adobe.com/2006/flex/mx/internal::getDefinitions()[E:\dev\hero_private\frameworks\projects\framework\src\mx\accessibil ity\AccImpl.as:315]
at mx.accessibility::UIComponentAccProps()[E:\dev\hero_private\framework s\projects\framework\src\mx\accessibility\UIComponentAccProps.as:183]
at mx.accessibility::UIComponentAccProps$/http://www.adobe.com/2006/flex/mx/internal::createAccessibilityImpleme ntation()[E:\dev\hero_private\frameworks\projects\framework\src\mx\accessibil ity\UIComponentAccProps.as:76]
at mx.core::UIComponent/initializeAccessibility()[E:\dev\hero_private\fr ameworks\projects\framework\src\mx\core\UIComponent.as:7681]
at mx.core::UIComponent/initialize()[E:\dev\hero_private\frameworks\proj ects\framework\src\mx\core\UIComponent.as:7636]
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\hero_private\frameworks\projects\framework\src\mx\core\UICom ponent.as:7485]
at mx.core::UIComponent/addChildAt()[E:\dev\hero_private\frameworks\proj ects\framework\src\mx\core\UIComponent.as:7189]
at spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\hero_p rivate\frameworks\projects\spark\src\spark\components\Group.as:2037]
at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\ Group.as:1628]
at spark.components::Group/setMXMLContent()[E:\dev\hero_private\framewor ks\projects\spark\src\spark\components\Group.as:633]
at spark.components::Group/createChildren()[E:\dev\hero_private\framewor ks\projects\spark\src\spark\components\Group.as:855]
at mx.core::UIComponent/initialize()[E:\dev\hero_private\frameworks\proj ects\framework\src\mx\core\UIComponent.as:7624]
at cafe.skins::PanelSkin/initialize()
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\hero_private\frameworks\projects\framework\src\mx\core\UICom ponent.as:7485]
at mx.core::UIComponent/addChild()[E:\dev\hero_private\frameworks\projec ts\framework\src\mx\core\UIComponent.as:7166]
at spark.components.supportClasses::SkinnableComponent/attachSkin()[E:\d ev\hero_private\frameworks\projects\spark\src\spark\components\support Classes\SkinnableComponent.as:692]
at spark.components.supportClasses::SkinnableComponent/validateSkinChang e()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components \supportClasses\SkinnableComponent.as:443]
at spark.components.supportClasses::SkinnableComponent/createChildren()[ E:\dev\hero_private\frameworks\projects\spark\src\spark\components\sup portClasses\SkinnableComponent.as:406]
at spark.components::SkinnableContainer/createChildren()[E:\dev\hero_pri vate\frameworks\projects\spark\src\spark\components\SkinnableContainer .as:879]
at mx.core::UIComponent/initialize()[E:\dev\hero_private\frameworks\proj ects\framework\src\mx\core\UIComponent.as:7624]
at com.southernco.view.components::EditGridColsWindow/initialize()
at mx.managers.systemClasses::ChildManager/childAdded()[E:\dev\hero_priv ate\frameworks\projects\framework\src\mx\managers\systemClasses\ChildM anager.as:189]
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::rawChildren_addChildAt()[E:\dev\hero_private\frameworks\projects\framework\src\mx\managers\S ystemManager.as:2139]
at mx.managers::SystemManager/addChildAt()[E:\dev\hero_private\framework s\projects\framework\src\mx\managers\SystemManager.as:1759]
at mx.managers::SystemManager/addChild()[E:\dev\hero_private\frameworks\ projects\framework\src\mx\managers\SystemManager.as:1742]
at mx.managers::PopUpManagerImpl/addPopUp()[E:\dev\hero_private\framewor ks\projects\framework\src\mx\managers\PopUpManagerImpl.as:340]
at mx.managers::PopUpManager$/addPopUp()[E:\dev\hero_private\frameworks\ projects\framework\src\mx\managers\PopUpManager.as:193]
at com.southernco.view::SevenGridMediator/updateColumns()[C:\Documents and Settings\x2mkotad\Adobe Flash Builder 4.5\SEPASchedules\src\com\southernco\view\SevenGridMediator.as:68]
at org.robotlegs.base::EventMap/routeEventToListener()[/Development/Proj ects/Robotlegs/robotlegs-framework/src/org/robotlegs/base/EventMap.as: 181]
at Function/<anonymous>()[/Development/Projects/Robotlegs/robotlegs-fram ework/src/org/robotlegs/base/EventMap.as:107]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[E:\dev\hero_private\frameworks\p rojects\framework\src\mx\core\UIComponent.as:13128]
at com.southernco.view::SevenGrid/gridSelect()[C:\Documents and Settings\x2mkotad\Adobe Flash Builder 4.5\SEPASchedules\src\com\southernco\view\SevenGrid.mxml:75]
North America
Europe, Middle East and Africa
Asia Pacific