I have a problem with an application that uses RobotLegs in a Flex module. I finally managed to load my module successfully, but when I try to add this line of code in the module view's Mediator:
view.addElementAt(applicationContainer,0);
I get this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.core::UIComponent/getStyle()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:11128]
at mx.core::UIComponent/getConstraintValue()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:9083]
at mx.core::UIComponent/get horizontalCenter()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:9252]
at spark.layouts::BasicLayout/measure()[E:\dev\4.y\frameworks\projects\spark\src\spark\layouts\BasicLayout.as:253]
at spark.components.supportClasses::GroupBase/measure()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\supportClasses\GroupBase.as:1148]
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::measureSizes()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:8506]
at mx.core::UIComponent/validateSize()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:8430]
at spark.components::Group/validateSize()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Group.as:1012]
at mx.managers::LayoutManager/validateSize()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\LayoutManager.as:665]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\LayoutManager.as:816]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1180]
Why is this happening? The component that I am trying to add is a Group component, any ideas?
for more information i dont use modular robotlegs because the module is loadad in an application that already implements pure robotlegs, so i want to reduce efort to implements modular robotlegs, is a big project, my module loads successfuly but the problems happends when i fire a event that changes the state view of the module for show another component, i use ApplicationDomain.currentDomain in the ModuleLoader.