tag:robotlegs.tenderapp.com,2009-10-18:/discussions/robotlegs-2/895-performing-injection-into-views-in-rl2Robotlegs: Discussion 2018-10-18T16:35:46Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/253042162013-02-25T17:10:45Z2013-02-25T17:10:45ZPerforming injection into Views in RL2<div><p>I guess you’ve already read this:<br>
<a href=
"https://github.com/robotlegs/robotlegs-framework/blob/master/src/robotlegs/bender/extensions/viewProcessorMap/readme.md">
https://github.com/robotlegs/robotlegs-framework/blob/master/src/ro...</a></p>
<p>See if my responses in these discussions can help you a
little:<br>
<a href=
"http://knowledge.robotlegs.org/discussions/robotlegs-2/760-need-the-shared-eventdispatcher-inside-my-mxml-specific-reason#comment_23802536">
http://knowledge.robotlegs.org/discussions/robotlegs-2/760-need-the...</a></p>
<p><a href=
"http://knowledge.robotlegs.org/discussions/questions/1739-how-do-i-initialize-a-view-without-a-model#comment_24050120">
http://knowledge.robotlegs.org/discussions/questions/1739-how-do-i-...</a></p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/253042162013-02-25T17:16:40Z2013-02-25T17:16:40ZPerforming injection into Views in RL2<div><p>And this one too:<br>
<a href=
"http://knowledge.robotlegs.org/discussions/questions/2000-passing-data-between-views#comment_25205027">
http://knowledge.robotlegs.org/discussions/questions/2000-passing-d...</a></p>
<p>Not the best examples, but that's all I can offer you at the
moment...</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/253042162013-02-26T09:47:04Z2013-02-26T09:47:04ZPerforming injection into Views in RL2<div><p>Thanks. I'll dive in later today and see if I can get any joy
out of it via the examples</p></div>philostlertag:robotlegs.tenderapp.com,2009-10-18:Comment/253042162013-02-26T17:18:37Z2013-02-26T17:18:37ZPerforming injection into Views in RL2<div><p>Root of my problem appears to be that I'm using the SARS
extension and Robotlegs isn't performing injection on views being
added to the stage on my multiple instances of Starling (although
it can see them being added as mediators are being created)</p>
<p>My solution is to process the view in the mediator as
follows...<br></p>
<pre>
<code>[Inject]
public var view:MyView;
[Inject]
public var viewProcessorMap:IViewProcessorMap;
//
public override function initialize():void {
viewProcessorMap.process(view);
}</code>
</pre>
<p>This works well enough for me atm. Thanks for your help!</p></div>philostler