EventMap in Actor and lost event handlers
Hello. Please give me a hint what could be wrong. My controller
(yes, for some tasks I'm going with stateful controllers rather
than commands) extends Actor, it's mapped as Singleton, and in
[PostConstruct] I listen to context event there this way:
eventMap.mapListener(eventDispatcher, BoosterEvent.USE_INGAME, onUseIngameBooster, BoosterEvent);
which is not triggered. But if I use non-week reference option — it works. How come that something get's GCed?
For me it looks like mediators' addContextListener is implemented in the exact same fashion, but it works well with week-referenced listeners.
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 creynders on Nov 12, 2013 @ 12:50 PM
How is the instantiation of the controller enforced?
2 Posted by pavel.fljot on Nov 12, 2013 @ 01:09 PM
In context
3 Posted by pavel.fljot on Nov 12, 2013 @ 01:11 PM
Which brings me to http://knowledge.robotlegs.org/discussions/problems/636-injectorins...
thank you, Camille)
pavel.fljot closed this discussion on Nov 12, 2013 @ 01:51 PM.
creynders re-opened this discussion on Nov 12, 2013 @ 02:34 PM
Support Staff 4 Posted by creynders on Nov 12, 2013 @ 02:34 PM
Glad my question helped ;)
Support Staff 5 Posted by creynders on Nov 12, 2013 @ 02:34 PM
Oops, didn't mean to re-open.
creynders closed this discussion on Nov 12, 2013 @ 02:34 PM.