Injections in Mediator extensions

Alejandro Santander's Avatar

Alejandro Santander

03 Apr, 2013 07:07 PM

Hi,

I have a signal that all my view mediators need to listen to, so I decided to create a base or abstract mediator that deals with this signal. However, I get a runtime error of a missing injection in the extending class of an injection declared in the superclass.

Is this intentional and is there any reason that the framework wouldn't want us to do such a thing?

Thanks

  1. Support Staff 1 Posted by Ondina D.F. on 04 Apr, 2013 07:54 AM

    Ondina D.F.'s Avatar

    Hi Alejandro,

    Actually, this should work just fine.
    Could it be that you forgot to map the signal in your config class?
    injector.map(SomeSignal).asSingleton();

    Can you paste some relevant code? How you map the signal, how you map the mediator, how you inject the signal and how you use it…

    Ondina

  2. 2 Posted by Alejandro Santa... on 04 Apr, 2013 01:27 PM

    Alejandro Santander's Avatar

    Oh I see.

    Yes in fact it works. The signal I was injected corresponded to another injector which wasn't initialized at the time I was adding the views.

    Thanks a lot!

  3. Support Staff 3 Posted by Ondina D.F. on 04 Apr, 2013 03:25 PM

    Ondina D.F.'s Avatar

    No problem:)

  4. Ondina D.F. closed this discussion on 04 Apr, 2013 03:25 PM.

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

Keyboard shortcuts

Generic

? 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