mediator view injection not working

bill's Avatar


18 May, 2011 05:25 PM

Experimenting with RL and AS3 Signals.

Using a simple

mediatorMap.mapView(ButtonBarView, ButtonsMediator);

in my context class. In my ButtonsMediator class I have:

[inject] public var view:ButtonBarView;

but in the onRegister() function it says the value for view is null.

I'm getting the following warnings in my console:

Warning: Injector already has a rule for type "org.robotlegs.core::IReflector", named "".
If you have overwritten this mapping intentionally you can use "injector.unmap()" prior to your replacement mapping in order to avoid seeing this message.

Is there any correlation here? Am I missing something?

  1. 1 Posted by Stray on 18 May, 2011 05:39 PM

    Stray's Avatar

    [inject] (lower case i) should be
    [Inject] (upper case I)

    This is one of the reasons we're wary of metadata - no typo checking!

    Hopefully that simple fix will sort it :)

    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)


  2. 2 Posted by bill on 18 May, 2011 06:11 PM

    bill's Avatar


    I can't tell you how many times I compared examples and never noticed that damn "I".

    Thank you for your amazingly fast response. So far, so good :-)

  3. 3 Posted by Stray on 18 May, 2011 06:19 PM

    Stray's Avatar

    Easily done! My favourite version of that one is to do

    public var something:ISomething;

    The (nervous twitch) semi-colon at the end of the [meta] breaks the relationship with the following variable. Cue nothing happens.


  4. Stray closed this discussion on 25 May, 2011 08:08 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac