Mediating Non Visual Elements

seanrichter's Avatar


05 May, 2012 07:07 PM

I can't understand how to configure this layout I want. I want to mediate a non-visual class that generate animations. I want to display the animations in a view component. I thought I could inject both into the mediator but I keep getting the rules error.

I set up the non visual in the main app and the following in the context:
mediatorMap.mapView( HelpEventGenerator, HelpViewMediator, null, false, false );
mediatorMap.createMediator( new HelpEventGenerator());

Not only can i NOT inject the view but the events fired from the HelpEventGenerator class never get picked up in the HelpViewMediator.

  1. 1 Posted by Atul Kshirsagar on 05 May, 2012 08:29 PM

    Atul Kshirsagar's Avatar

    In a normal scenario, when mediator is mapped to a view the framework attaches the mediator to view when view is added to the stage. In your case since the in component to mediate is non- visual, the framework cannot help you completely. So in your code where your are instantiating the component, at that place you will have to explicitly call createMediator statement exactly like in your post but passing the actual class instance as the parameter.

  2. Ondina D.F. closed this discussion on 13 Jul, 2012 07:03 AM.

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