tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/662-adding-none-visual-items-when-a-visual-components-is-to-be-passed-as-a-parameterRobotlegs: Discussion 2012-10-29T15:47:59Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/198632342012-10-22T07:16:31Z2012-10-22T14:38:15ZAdding none visual items when a visual components is to be passed as a parameter<div><p>Hi Gary,</p>
<p>There are a couple of discussions around this topic on this
forum:</p>
<p><a href=
"http://knowledge.robotlegs.org/discussions/questions/664-mediating-a-non-displayobject">
http://knowledge.robotlegs.org/discussions/questions/664-mediating-...</a></p>
<p><a href=
"http://knowledge.robotlegs.org/discussions/questions/833-how-do-i-create-a-mediator-without-eventadded_to_stage">
http://knowledge.robotlegs.org/discussions/questions/833-how-do-i-c...</a></p>
<p><a href=
"http://knowledge.robotlegs.org/discussions/questions/904-mediating-non-visual-elements">
http://knowledge.robotlegs.org/discussions/questions/904-mediating-...</a></p>
<p>Please let us know whether they answer your question or not.</p>
<p>hth<br>
Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/198632342012-10-22T11:08:44Z2012-10-22T11:08:45ZAdding none visual items when a visual components is to be passed as a parameter<div><p>Whilst these topics talk about things related to none visual
items being injected and mediated (which I actually provided an
example of), they do not answer my original question.</p></div>tag:robotlegs.tenderapp.com,2009-10-18:Comment/198632342012-10-22T14:37:59Z2012-10-22T14:37:59ZAdding none visual items when a visual components is to be passed as a parameter<div><p>What exactly is not working?<br>
Have you tried injecting the view into TransitionManagerView?</p>
<p>I don’t know if something like the following is addressing
your problem, but from what you said, that’s what I
understand:</p>
<p>In the Context</p>
<pre>
<code>injector.mapClass(TransitionManagerView,TransitionManagerView);
injector.mapValue(SomeViewStack, new SomeViewStack());</code>
</pre>
<p>TransitionManagerView:</p>
<pre>
<code>[Inject]
public var someView:someViewStack;
public function TransitionManagerView()
{
super(someView);
}</code>
</pre>
<p>TransitionManager:</p>
<pre>
<code>private var _view:ViewStack;
public function TransitionManager(view:ViewStack)
{
_view=view;
}
//...do something with the view</code>
</pre>
<p>Where you need TransitionManagerView:</p>
<pre>
<code>var transManager:TransitionManagerView=injector.getInstance(TransitionManagerView);
mediatorMap.createMediator(transManager);</code>
</pre>
<p>hth</p></div>Ondina D.F.