tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/803-no-subjectRobotlegs: Discussion 2013-04-23T15:17:10Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/261893912013-04-03T14:32:13Z2013-04-03T14:32:13ZPopup support with Module<div><p>Hey Phillip,</p>
<p>It is possible to load modules inside a popup in rl1, but
it’s a much more painful process (especially when it comes to
garbage collection) than in rl2.<br>
Too bad, you can’t or don’t want to use rl2 :)</p>
<p>Anyway, try this:<br>
View:</p>
<pre>
<code>protected var context:ApplicationContext;
//handler for mx.events.FlexEvent.PREINITIALIZE
protected function preinitializeHandler(event:FlexEvent):void
{
var contextView:DisplayObjectContainer = systemManager.topLevelSystemManager as DisplayObjectContainer;
context = new ApplicationContext(contextView);
}</code>
</pre>
<p>Config:<br></p>
<pre>
<code>public function ApplicationContext(contextView:DisplayObjectContainer = null, autoStartup:Boolean = true)
{
super(contextView, true);
}</code>
</pre>
<p>And tell me if it works for you.</p>
<p>I suppose you’re using the Modular utility, right?</p>
<p>Regarding the errors, it’s hard to tell what they mean.
Maybe it has to do with the way you pass the ApplicationDomain to
the module.</p>
<p>Can you post the code for your main context, and that of the
module, and also the part where you set parentInjector in your
module.</p>
<p>If you can, it would be even better to attach the app (as zip),
or a simple example that reproduces the issue. It might be easier
to find the culprit(s).</p>
<p>Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/261893912013-04-03T14:57:02Z2013-04-03T14:57:02ZPopup support with Module<div><p>If you want it in your declaration tag:</p>
<pre>
<code><context:ApplicationContext contextView="{SystemManager.getSWFRoot(this) as DisplayObjectContainer}"/></code>
</pre>
<p>But this in conjuction with the modular utility, mappings get
overwritten and you get some warnings....<br>
I prefer to instantiate the context through actionscript.</p></div>Ondina D.F.