Injections in Mediator extensions
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
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
Support Staff 1 Posted by Ondina D.F. on 04 Apr, 2013 07:54 AM
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 Posted by Alejandro Santa... on 04 Apr, 2013 01:27 PM
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!
Support Staff 3 Posted by Ondina D.F. on 04 Apr, 2013 03:25 PM
No problem:)
Ondina D.F. closed this discussion on 04 Apr, 2013 03:25 PM.