If you define the module in MXML, but do not load it with ModuleLoader,
you should have control over parenting.

 

MXML includes styles from defaults.css, but AS does not.

 

-Alex

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of chuyler1
Sent: Wednesday, August 29, 2007 9:46 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Very simple module crash: Instantiation
attempted on a non-constructor

 

I found a work-around. I have to define my module using mxml instead
of straight ActionScript. For some reason it wasn't loading the halo
skin classes into the module and since they weren't available in the
main app either it would crash when it tried to get the class name
from the default css file and instantiate it.

So basically an ActionScript object which extends Module is not
sufficient for creating a module which contains certain components
which are skinned using skin classes. 

Its kind of dumb in my case because I don't want any of my objects to
have parents (they will be placed in the main application view once
loaded). I have to use the initialize="onInitialize()" event to
create my objects instead of a constructor.

 

Reply via email to