Hi Roger, thanks for your answer. Actually I didn't set the application domain of the modules i was loading so i believe your diagnose could be right, since I was actually loading these modules inside another module, that itself was loaded in the mainapp (without changing any application domains anywhere). What I did for the moment because of a pretty tight deadline, is converting the block modules to components that are then embedded in larger modules that are loaded in the main app. That works fine, even if i would have liked to have every block in separated modules, but the deadline being very close, I had to take action quickly :)
On the other hand, the first issue i posted about returned to the surface : Main application is loading a bunch of swf's that define classes that all inherit from the same super class. When playing the app with the debug player, it throws #1074 errors for each component, because apparently it tries to overwrite the already defined superclass. I load the swf's using a pretty "classic" approach ldr = new Loader(); context = new LoaderContext(); context.applicationDomain = ApplicationDomain.currentDomain; ldr.load(url, context); // url is an URLRequest instance any idea what could be causing that error? I remember you said something about looking at the externs options of the compiler... I took a look but I have to admit i'm still unsure about what to do in this case :) Anyway, thanks a lot for your help, have a nice weekend :) J. --- In [email protected], "Roger Gonzalez" <[EMAIL PROTECTED]> wrote: > > This sort of situation usually arises when the interface isn't defined > in a common ApplicationDomain (generally the parent). Did you load the > module into a separate ApplicationDomain rooted off the system domain? > If so, then the two interfaces are unrelated (even though they have the > same name/definition). Make sure you're loading the module into a child > of the main app. (I assumed that you were - is the "ready" event > handler you cite defined in the parent? If so, I'd think it would be > linked in. Just checking.) > > Dump out a link-report for each of the things that you're compiling and > ensure that the interface is defined where you expect. > > -rg > > > ________________________________ > > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf Of jerome_cordiez > Sent: Tuesday, January 23, 2007 10:54 AM > To: [email protected] > Subject: [flexcoders] Module subclass issue > > > > Hello, > > I finally decided to port an existing development towards the > new > Modules architecture, and i am facing a pretty tough issue here. > > I have a bunch of modules, that all extend BlockModule, which is > a > Module subclass that itself implements the IBlockModule > interface. > BlockModule and IBlockModule are in a library that the modules > project > includes. > Apparently, everything compiles fine, so far so good. > > But now, in my application, I load these modules (using > ModuleLoader), > and, when ready, try to set a "symbol" property on these > modules. > Using the target property of the ModuleEvent, I correctly find > the > modules. But, in order to be able to set the "symbol" property, > I need > to cast them as IBlockModule. > > And, that simply doesn't work. > > Here is what my "ready" event listener looks like : > > private function blockReady( pEvt:ModuleEvent ) : void > { > var ml:ModuleLoader = pEvt.target as ModuleLoader; > var block:IBlockModule = ml.child as IBlockModule; > trace (ml.child); // output is correct > trace (block); // null (apparently, the casting failed) > if( block != null) { > block.symbol = symbol; > } > } > > From what my googling tells me, I believe it might be an issue > with > the shared library.... But I honestly have no clue of what > precisely > (everything seems correct to me) nor of how I could solve this. > > If anyone has an idea, i would love to hear it :) > cheers, > J. >

