tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/183-app-mediator-not-instantiated-but-only-onlineRobotlegs: Discussion 2018-10-18T16:35:18Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/32278372010-10-05T07:46:56Z2010-10-05T07:46:56ZApp mediator not instantiated, but only ONLINE<div><p>Hi creynders,</p>
<p>take a look at :<br />
<a href="http://github.com/robotlegs/robotlegs-framework/wiki/Common-Problems#no-injection">http://github.com/robotlegs/robotlegs-framework/wiki/Common-Problem...</a><br />
(the metadata will stay intact while debugging but will be stripped out when you publish your release build)</p>
<p>Does it help?<br />
Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/32278372010-10-05T07:49:19Z2010-10-05T07:49:19ZApp mediator not instantiated, but only ONLINE<div><p>or this:<br />
<a href="http://knowledge.robotlegs.org/faqs/reference-mvcs-implementation/can-i-mediate-my-root-application">http://knowledge.robotlegs.org/faqs/reference-mvcs-implementation/c...</a></p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/32278372010-10-05T08:00:24Z2010-10-05T08:00:24ZApp mediator not instantiated, but only ONLINE<div><p>or you'd have to create the Mediator like this:<br />
</p>
<pre>
override public function startup():void
{
mediatorMap.mapView(MediateApplicationExample, AppMediator);
mediatorMap.createMediator(contextView);
}
</pre>
<p> see: <a href="http://github.com/robotlegs/robotlegs-framework/wiki/best-practices#context">http://github.com/robotlegs/robotlegs-framework/wiki/best-practices...</a>
(Mapping the Main Application (contextView) Mediator)</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/32278372010-10-05T08:16:48Z2010-10-23T09:55:03ZApp mediator not instantiated, but only ONLINE<div><p>I'm using the .swc so normally the required compiler arguments are included.</p>
<p>And, I've been testing a little more and it gets crazier by the minute.<br />
Originally I used:<br />
</p>
<pre><code><backoffice:AppContext contextView="{ Application.application.systemManager }" /></code></pre>
<p>(using this, I don't have to instantiate the popup mediators manually)
and it works fine debugging straight in FB, w/o using a webserver, but once served by a webserver, it fails to create the app mediator.<br />
So I switched to<br />
</p>
<pre><code><backoffice:AppContext contextView="{ this }" /></code></pre>
<p>And now it does create an app mediator in both cases, but it fails to create some other mediators (!!!)<br />
... very weird ...</p>
<p>Alas,<br />
</p>
<pre><code>mediatorMap.createMediator(contextView);</code></pre>
<p>didn't solve anything...</p></div>creynderstag:robotlegs.tenderapp.com,2009-10-18:Comment/32278372010-10-05T08:28:25Z2010-10-05T08:28:25ZApp mediator not instantiated, but only ONLINE<div><p>You are talking about popup mediators?</p>
<p>Then maybe this will help:)<br />
<a href="http://knowledge.robotlegs.org/faqs/reference-mvcs-implementation/how-to-mediate-a-flex-popup">http://knowledge.robotlegs.org/faqs/reference-mvcs-implementation/h...</a></p>
<p>Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/32278372010-10-05T08:39:11Z2010-10-05T08:39:11ZApp mediator not instantiated, but only ONLINE<div><p>It would be better if you posted the code for the mapping and for the instatiation of your context in your root View (Application)<br />
</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/32278372010-10-05T08:40:23Z2010-10-23T09:55:03ZApp mediator not instantiated, but only ONLINE<div><p>Well, no, I wasn't really talking about mediating popups. I mean, yes I do mediate popups, but that's not causing the problem, I just mentioned it so you'd know WHY I use <code>Application.application.systemManager</code>, instead of <code>this</code></p>
<p>In the meantime I found a solution of some sorts. If I map the AppMediator earlier on in my bootstrap sequence, then it does work in all cases. That goes against<br />
</p>
<blockquote><p>To avoid unexpected behavior it is recommended that you map your context mediator last.
but apparently I've got no other choice. However, I don't like it, since I've got a feeling it can suddenly break again...</p></blockquote></div>creynderstag:robotlegs.tenderapp.com,2009-10-18:Comment/32278372010-10-05T08:55:17Z2010-10-05T08:55:17ZApp mediator not instantiated, but only ONLINE<div><p>Well then this is a special case:<br />
Application as the contextView vs. SystemManager as the contextView.<br />
I’m sure Stray or Shaun or someone else will help you with this.</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/32278372010-10-05T09:12:06Z2010-10-23T09:55:03ZApp mediator not instantiated, but only ONLINE<div><p>Thanks for taking your time and helping out, BTW!</p></div>creynders