0 Replies Latest reply on Sep 2, 2008 9:26 PM by aaron.renner

    Flex Actionscript Module causing Error 1009

    aaron.renner
      I have created a shell application to display portlets which are defined in flex modules. However, when I try to load TestModule.as, I get the following runtime error:

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at mx.containers::Panel/layoutChrome()
      at mx.core::Container/updateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\ core\Container.as:2860]
      at mx.containers::Panel/updateDisplayList()
      at mx.core::UIComponent/validateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src \mx\core\UIComponent.as:6293]
      at mx.core::Container/validateDisplayList()[E:\dev\3.1.0\frameworks\projects\framework\src\m x\core\Container.as:2670]
      at mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.1.0\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:605]
      at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.1.0\frameworks\projects\frame work\src\mx\managers\LayoutManager.as:660]
      at Function/ http://adobe.com/AS3/2006/builtin::apply()
      at mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.1.0\frameworks\projects\framework\sr c\mx\core\UIComponent.as:8565]
      at mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.1.0\frameworks\projects\framework\src \mx\core\UIComponent.as:8508]

      I can fix this error by adding private static panel:Panel; to Shell.mxml, but then the checkbox in TestPortlet.mxml doesn't appear correctly. To make matters more interesting if I load MXMLMod.mxml, everything appears correctly. Is something wrong with my ActionScript module (TestModule.as)? What am I missing?

      Thanks in advance for your help.