tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/318-mediator-view-injection-not-workingRobotlegs: Discussion 2018-10-18T16:35:27Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/73119182011-05-18T17:25:28Z2011-09-12T16:38:47Zmediator view injection not working<div><p>Experimenting with RL and AS3 Signals.</p>
<p>Using a simple</p>
<p>mediatorMap.mapView(ButtonBarView, ButtonsMediator);</p>
<p>in my context class. In my ButtonsMediator class I have:</p>
<p>[inject] public var view:ButtonBarView;</p>
<p>but in the onRegister() function it says the value for view is
null.</p>
<p>I'm getting the following warnings in my console:</p>
<p>Warning: Injector already has a rule for type
"org.robotlegs.core::IReflector", named "".<br>
If you have overwritten this mapping intentionally you can use
"injector.unmap()" prior to your replacement mapping in order to
avoid seeing this message.</p>
<p>Is there any correlation here? Am I missing something?</p></div>billtag:robotlegs.tenderapp.com,2009-10-18:Comment/73119182011-05-18T17:39:17Z2011-05-18T17:39:17Zmediator view injection not working<div><p>[inject] (lower case i) should be [Inject] (upper case I)</p>
<p>This is one of the reasons we're wary of metadata - no typo
checking!</p>
<p>Hopefully that simple fix will sort it :)</p>
<p>The IReflector warning tells me that you're using Flex - is that
true? If so then don't worry about that one - it's only a warning
and with flex we basically run through start-up twice - once when
you create the context and again when you set your contextView - so
that's normal. (We're figuring out how best to deal with that but
it's non-breaking, it's just the warnings in SS are new)</p>
<p>Stray</p></div>Straytag:robotlegs.tenderapp.com,2009-10-18:Comment/73119182011-05-18T18:11:18Z2011-09-12T16:38:47Zmediator view injection not working<div><p>DOH!!</p>
<p>I can't tell you how many times I compared examples and never
noticed that damn "I".</p>
<p>Thank you for your amazingly fast response. So far, so good
:-)</p></div>billtag:robotlegs.tenderapp.com,2009-10-18:Comment/73119182011-05-18T18:19:48Z2011-05-18T18:19:48Zmediator view injection not working<div><p>Easily done! My favourite version of that one is to do</p>
<p>[Inject]; public var something:ISomething;</p>
<p>The (nervous twitch) semi-colon at the end of the [meta] breaks
the relationship with the following variable. Cue nothing
happens.</p>
<p>Duh!</p></div>Stray