tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/263-mobileapplication-navigator-errorRobotlegs: Discussion 2018-10-18T16:35:23Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/54033442011-02-17T09:17:05Z2011-02-28T21:53:47ZMobileApplication navigator error<div><p>I found some additional conditions.<br>
If I replace:<br>
mainView.navigator.pushView(event.viewClass, event.data,
event.transition);<br>
with<br>
FlexGlobals.topLevelApplication.navigator.pushView(event.viewClass,
event.data, event.transition);</p>
<p>it's working mainView is injected in my command and also
declared in context file<br>
injector.mapSingletonOf(Gallery1,Gallery1);</p>
<p>Why it cannot be executed when I using injected mainVIew?</p></div>dimitarmartag:robotlegs.tenderapp.com,2009-10-18:Comment/54033442011-02-17T09:37:48Z2011-02-17T09:37:50ZMobileApplication navigator error<div><p>So finally maybe the correct question is. How to inject main
application mxml (FlexGlobals.topLevelApplication) ?</p></div>dimitarmartag:robotlegs.tenderapp.com,2009-10-18:Comment/54033442011-08-09T22:05:45Z2011-08-09T22:05:47ZMobileApplication navigator error<div><p>Off the top of my head, you could try setting up the following
in your context:</p>
<pre>
injector.mapValue(ViewNavigator, FlexGlobals.topLevelApplication.navigator);
</pre>
<p>and then injecting the ViewNavigator into a NavigationModel you
create to handle that.</p></div>Max