Mediating Non Visual Elements
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.
Comments are currently closed for this discussion. You can start a new one.
2 Posted by Atul Kshirsagar on 05 May, 2012 08:29 PM
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.
Ondina D.F. closed this discussion on 13 Jul, 2012 07:03 AM.