The module will share the button w the main app
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dennis van Nooij
Sent: Thursday, October 25, 2007 2:34 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ModuleManager.getAssociatedFactory returning wrong
result ?
Hi,
I'm trying to split up my application into modules but ran into this
weird behaviour. According to the docs getAssociatedFactory should
return "See if the referenced object is associated with (or, in the
managed ApplicationDomain of) a known IFlexModuleFactory implementation"
The thing is when I startup my app without modules it returns null (as
it should) but when I load a module it returns the same factory for
objects in the module as well as in the shell .. ?
Here's the code:
Shell:
http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> "
layout="absolute" creationComplete="loadModule()">
Module:
http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> " layout="absolute"
width="400" height="300">
With this output:
[SWF]
Users:dennisvannooij:Documents:workspace:ModuleTest:bin:ModuleTest.swf
- 522,921 bytes after decompression
factory null
[SWF]
Users:dennisvannooij:Documents:workspace:ModuleTest:bin:ButtonModule.swf
- 518,830 bytes after decompression
factory [object _ButtonModule_mx_core_FlexModuleFactory]
factory name instance16
factory [object _ButtonModule_mx_core_FlexModuleFactory]
factory name instance16
Last two traces are from clicking first the shell button, then the
module button..
am I missing something here ?
Dennis