Thanks Roger.
I 've got it working now. Casting the factory product to DisplayObject
and using addChild was the thing I was missing.
I have put together my findings in:
http://blog.startup.gr/blog/_archives/2007/1/19/2664880.html

Do comment in there if sth is not correct.


--- In [email protected], "Roger Gonzalez" <[EMAIL PROTECTED]> wrote:
>
> This isn't technically a module question.  I believe that you will find
> the same behavior if you were to "new" a frameworks class and then try
> to access it.  Did you call "addChild()" on the product of the factory?
>  
> I'd get that working first in a simple hard-linked case.
>  
> Note that you may well run into issues if you try to make a
> frameworks-based module that doesn't extend mx:Module.  There is some
> codegen magic that happens in that case that doesn't happen if you
> extend the more stripped-down ModuleBase.
>  
> -rg
> 
> 
> ________________________________
> 
>       From: [email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of tvikatos
>       Sent: Friday, January 19, 2007 12:51 AM
>       To: [email protected]
>       Subject: [flexcoders] Re: Problem with module classes
> instantiation through ModuleManager
>       
>       
> 
>       Anyone expert in modules, has a clue?
>       Is ModuleManager and the factory you get when loading a module, 
>       supposed to work with AS-only modules?
>       We are generally lacking documentation and examples with the 
>       ModuleManager...
>       
>       --- In [email protected]
> <mailto:flexcoders%40yahoogroups.com> , "tvikatos" <tvikatos@> wrote:
>       >
>       > I have a module that combines mxml and as3. The problem I
> describe
>       > below happens in either case:
>       > * main module file in AS extending ModuleBase
>       > * main module file in MXML extending mx:Module
>       > 
>       > When I load the module using ModuleLoader and its 'child'
> property,
>       > all is good.
>       > When I use ModuleManager and I instantiate a module object
> through
>       > IModuleInfo.factory.create(), the objects defined as MXML tags
> 
>       within
>       > my module are not instantiated (properties remain null).
>       > Is there something I can do to properly instantiate the module
>       > (something that apparently ModuleLoader does behind the
> scene)?
>       > 
>       > Or should I just not use any MXML with modules?
>       >
>


Reply via email to