mediators stop working

Perconte's Avatar


11 Mar, 2012 01:36 PM

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?

  1. 1 Posted by Stray on 11 Mar, 2012 01:39 PM

    Stray's Avatar

    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?


  2. 2 Posted by Perconte on 11 Mar, 2012 01:46 PM

    Perconte's Avatar

    Hi Stray,

    I did as you told me, but it didn't help :(

  3. 3 Posted by Stray on 11 Mar, 2012 01:52 PM

    Stray's Avatar

    Can you post the code where you are creating your context?


  4. 4 Posted by Perconte on 11 Mar, 2012 02:07 PM

    Perconte's Avatar

    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. 5 Posted by Stray on 11 Mar, 2012 02:59 PM

    Stray's Avatar

    Excellent! That's good - glad to have been of help :)

  6. Ondina D.F. closed this discussion on 13 Mar, 2012 01:09 PM.

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