mediators stop working
Hi all! After laoding swf file(robotlegs project) and adding it to contextView of the main project(also robotlegs), mediators in main project stops responding. For example simple mouse event click on the view which I map and listen in mediator wont trigger.
eventMap.mapListener(view, MouseEvent.CLICK, clickEvent);
Where could be the problem?
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
1 Posted by Stray on 11 Mar, 2012 01:39 PM
Hi Perconte,
usually this is caused by not holding on to your context. Eg - if you do this...
var context:Context = new MyContext(this);
you'll find that the context is garbage collected after a few seconds.
You need to assign the context to a permanent member variable, rather than a temporary one.
Could that be it?
Stray
2 Posted by Perconte on 11 Mar, 2012 01:46 PM
Hi Stray,
I did as you told me, but it didn't help :(
3 Posted by Stray on 11 Mar, 2012 01:52 PM
Can you post the code where you are creating your context?
Stray
4 Posted by Perconte on 11 Mar, 2012 02:07 PM
Oh...Stray, I apologize! I misunderstand you, I made a variable to main view in main context. Thank you very much now it is working ;)
5 Posted by Stray on 11 Mar, 2012 02:59 PM
Excellent! That's good - glad to have been of help :)
Ondina D.F. closed this discussion on 13 Mar, 2012 01:09 PM.