Cheers Alex,

Two points to note:

1) This error does not get thrown if I do *not* set the width and height params for the panel *but* the panel does not display?

2) If I have a Panel instantiated in the shell i.e. use a Panel to load the modules into *all* works absolutely fine?

:S

On 26 Oct 2008, at 04:21, Alex Harui wrote:


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: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Simon Bailey
Sent: Saturday, October 25, 2008 2:23 PM
To: [email protected]
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





Reply via email to