6 Replies Latest reply on May 10, 2010 7:53 PM by Miggl

    ButtonBar crashing Module

    Miggl

      Hi everyone, I've had to take a break from FLEX development

      for a few months, but now have finally been able to find some time to get dabbling again. So please bear with me, I'm still playing catch-up.

       

      Here is the problem: it seems that if I place a ButtonBar inside a module using Flex 4, it causes a crash:

      TypeError: 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]

       

      How can I work around this? Other than foregoing the use of the ButtonBar (which I need for UI design aspects).

       

      Thanks for all your help!


      ~Mike