Not sure I understand your delay technique, but it appears that the Panel's style defaults are not registered with the StyleManager. titleBarBackground is created in createChildren() so you can debug there.
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Simon Bailey Sent: Saturday, October 25, 2008 2:23 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex Module issue with Panel Hi, I have an application which loads modules no problem, I have all sorts of components inside the actual modules and all works a dream. I am using ModuleManager.getModule( url ) and onLoad using the module factory method to create a ModuleBase. One area I have done things different is delaying instantiation of the View, so the module gets loaded and I then add the view component at a later time. So basically I load an empty module shell and then later load a component into it. So heres the problem, when I load a Panel component into the module, call addChild() (works fine on other components) POW!!! I get the dreaded #1009 error and: Cannot access a property or method of a null object reference. at mx.containers::Panel/layoutChrome()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\containers\Panel.as:1403] Panels titleBarBackground is declared as null??? Any ideas anyone, as this is a la! te night headache growing? Cheers, S