tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/135-no-subjectRobotlegs: Discussion 2018-10-18T16:35:14Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/23567642010-07-24T16:49:30Z2010-07-24T16:49:30ZModular Utility and R.L. 1.1.2<div><p>This is a test project using Modular</p></div>oscartag:robotlegs.tenderapp.com,2009-10-18:Comment/23567642010-08-22T16:18:42Z2010-08-22T16:22:35ZModular Utility and R.L. 1.1.2<div><p>Hi Oscar,</p>
<p>Looking for an example to load modules dynamically at runtime, I found your question and your ModularTest.fxp test project.</p>
<p>I tried your ModularTest with R.L. 1.1.2. and the latest version (june, 7 2010) of Joel Hooks Modular Utility and got the following warnings:</p>
<ul>
<li><p>modules.m1:M1 is a module or application that is directly referenced.
This will cause modules.m1:M1 and all of its dependencies to be linked in with Main.<br />
Using an interface is the recommended practice to avoid this.</p></li>
<li><p>modules.m2:M2 is a module or application that is directly referenced.
This will cause modules.m2:M2 and all of its dependencies to be linked in with Main.<br />
Using an interface is the recommended practice to avoid this.</p></li>
</ul>
<p>I then added Interfaces to the modules and the property applicationDomain to the moduleLoader.<br />
With these changes ModularTest works fine with R.L. 1.1.2. and the Modular Utility.</p>
<p>Arjen</p>
<p>I attached ModularTest1.zip containing the following changes:</p>
<ul>
<li>added interface files: interfaces.IM1Module, interfaces.IM2Module</li>
<li>module.m1.M1.mxml now implements interfaces.IM1Module</li>
<li>module.m2.M2.mxml now implements interfaces.IM2Module</li>
<li>Maincontext.as now mappes the interfaces for automatic injection
(viewMap.mapType( IM1Module); viewMap.mapType( IM2Module);)</li>
<li>Main.mxml has property applicationDomain added to the ModuleLoader
(<mx:ModuleLoader id="ml" applicationDomain = "{ApplicationDomain.currentDomain}" />)</li>
</ul></div>arjen10822