0 Replies Latest reply on Aug 14, 2010 9:05 AM by gohloum

    Loading Module throws UIComponent error

    gohloum Level 1

      Hello,

       

      I am trying to use the ModuleManager to load and unload modules in my app.  If the module has basic contents (no complex spark controls) then everthing loads fine.  However, if I try and load a module with say a Spark Button Bar control or other various controls, I get style errors thrown by the UIComponent class.

       

      I am working with PureMVC multicore framework, so it is vital that I use the ModuleManager for loading and unloading modules to manage core removals and various framework tasks.

       

      I have disabled the framework in my project to verify the problem lies specifically with FB 4.x.  Is there a workaround of fix for this issue?

       

      Below is my console trace:

       

      Error #1009: Cannot access a property or method of a null object reference.

      at mx.core::UIComponent/getStyle()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UI Component.as:10372]

      at mx.core::UIComponent/getConstraintValue()[E:\dev\4.0.0\frameworks\projects\framework\src\ mx\core\UIComponent.as:8612]

      at mx.core::UIComponent/get horizontalCenter()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as: 8730]

      at spark.layouts::BasicLayout/measure()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\lay outs\BasicLayout.as:215]

      at spark.components.supportClasses::GroupBase/measure()[E:\dev\4.0.0\frameworks\projects\spa rk\src\spark\components\supportClasses\GroupBase.as:1078]

      at mx.core::UIComponent/measureSizes()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\cor e\UIComponent.as:8042]

      at mx.core::UIComponent/validateSize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\cor e\UIComponent.as:7966]

      at spark.components::Group/validateSize()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\c omponents\Group.as:873]

      at mx.managers::LayoutManager/validateSize()[E:\dev\4.0.0\frameworks\projects\framework\src\ mx\managers\LayoutManager.as:617]

      at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.0.0\frameworks\projects\frame work\src\mx\managers\LayoutManager.as:709]

      at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.0.0\frameworks\projec ts\framework\src\mx\managers\LayoutManager.as:1072]