robotlegs/robotlegs-framework — Issue #59: Errors when trying to inject view into mediator using interface instead of view class
Author: pixels4nickels
Created: 2012-01-25 18:25:44+00:00
State: open

In my config class:

[PostConstruct]
public function init():void
{
mediatorMap.mapView(iAppView).toMediator(AppViewMediator);
commandMap.map(TestSignal).toCommand(TestCommand);
}

This throws an error:
Error: Injector is missing a mapping to handle injection into property "view" of object "[object AppViewMediator]" with type "[class AppViewMediator]". Target dependency: "views.api::iAppView|"
at org.swiftsuspenders.typedescriptions::PropertyInjectionPoint/applyInjection()[/Users/till/dev/swiftsuspenders/swiftsuspenders/src/org/swiftsuspenders/typedescriptions/PropertyInjectionPoint.as:48]
at org.swiftsuspenders::Injector/applyInjectionPoints()[/Users/till/dev/swiftsuspenders/swiftsuspenders/src/org/swiftsuspenders/Injector.as:468]
at org.swiftsuspenders::Injector/org.swiftsuspenders.internal::instantiateUnmapped()[/Users/till/dev/swiftsuspenders/swiftsuspenders/src/org/swiftsuspenders/Injector.as:403]
at org.swiftsuspenders::Injector/getInstance()[/Users/till/dev/swiftsuspenders/swiftsuspenders/src/org/swiftsuspenders/Injector.as:331]
at robotlegs.bender.extensions.mediatorMap.impl::MediatorFactory/createMediator()[/Users/krogers/Git/robotlegs-framework/src/robotlegs/bender/extensions/mediatorMap/impl/MediatorFactory.as:60]
at robotlegs.bender.extensions.mediatorMap.impl::MediatorMapping/createMediator()[/Users/krogers/Git/robotlegs-framework/src/robotlegs/bender/extensions/mediatorMap/impl/MediatorMapping.as:98]
at robotlegs.bender.extensions.mediatorMap.impl::MediatorViewHandler/handleView()[/Users/krogers/Git/robotlegs-framework/src/robotlegs/bender/extensions/mediatorMap/impl/MediatorViewHandler.as:77]
at robotlegs.bender.extensions.mediatorMap.impl::MediatorMap/handleView()[/Users/krogers/Git/robotlegs-framework/src/robotlegs/bender/extensions/mediatorMap/impl/MediatorMap.as:79]
at robotlegs.bender.extensions.viewManager.impl::ContainerBinding/handleView()[/Users/krogers/Git/robotlegs-framework/src/robotlegs/bender/extensions/viewManager/impl/ContainerBinding.as:93]
at robotlegs.bender.extensions.viewManager.impl::StageObserver/onViewAddedToStage()[/Users/krogers/Git/robotlegs-framework/src/robotlegs/bender/extensions/viewManager/impl/StageObserver.as:94]

I am trying to update my simple example app for an extension I am working on. This was working before using this line:
mediatorMap.map(iAppView).toMediator(AppViewMediator);
instead iof
mediatorMap.mapView(iAppView).toMediator(AppViewMediator);

But it seems I can no longer use "map". Not sure if that helps!