tschneidereit / SwiftSuspenders

NOTE: Find the offical repo at http://github.com/robotlegs/swiftsuspenders
https://github.com/robotlegs/swiftsuspenders
MIT License
280 stars 89 forks source link

Injection doesn't work properly with Hero 4.5 #53

Closed reduxdj closed 12 years ago

reduxdj commented 13 years ago

For instance:

If I add my userProxy to my LoginMediator with injection this error happens which doesn't make sense...

Error: Injector is missing a rule to handle injection into property "serviceDelegate" of object "[object UserProxy]". Target dependency: "net.voxel.business::ServiceDelegate", named "" at org.swiftsuspenders.injectionpoints::PropertyInjectionPoint/applyInjection()[/Users/tschneidereit/dev/swiftsuspenders/swiftsuspenders/src/org/swiftsuspenders/injectionpoints/PropertyInjectionPoint.as:43] at org.swiftsuspenders::Injector/injectInto()[/Users/tschneidereit/dev/swiftsuspenders/swiftsuspenders/src/org/swiftsuspenders/Injector.as:125] at org.swiftsuspenders::Injector/instantiate()[/Users/tschneidereit/dev/swiftsuspenders/swiftsuspenders/src/org/swiftsuspenders/Injector.as:139] at org.swiftsuspenders.injectionresults::InjectSingletonResult/createResponse()[/Users/tschneidereit/dev/swiftsuspenders/swiftsuspenders/src/org/swiftsuspenders/injectionresults/InjectSingletonResult.as:40] at org.swiftsuspenders.injectionresults::InjectSingletonResult/getResponse()[/Users/tschneidereit/dev/swiftsuspenders/swiftsuspenders/src/org/swiftsuspenders/injectionresults/InjectSingletonResult.as:31] at org.swiftsuspenders::InjectionConfig/getResponse()[/Users/tschneidereit/dev/swiftsuspenders/swiftsuspenders/src/org/swiftsuspenders/InjectionConfig.as:43] at org.swiftsuspenders::InjectionConfig/getResponse()[/Users/tschneidereit/dev/swiftsuspenders/swiftsuspenders/src/org/swiftsuspenders/InjectionConfig.as:49] at org.swiftsuspenders.injectionpoints::PropertyInjectionPoint/applyInjection()[/Users/tschneidereit/dev/swiftsuspenders/swiftsuspenders/src/org/swiftsuspenders/injectionpoints/PropertyInjectionPoint.as:36] at org.swiftsuspenders::Injector/injectInto()[/Users/tschneidereit/dev/swiftsuspenders/swiftsuspenders/src/org/swiftsuspenders/Injector.as:125] at org.swiftsuspenders::Injector/instantiate()[/Users/tschneidereit/dev/swiftsuspenders/swiftsuspenders/src/org/swiftsuspenders/Injector.as:139] at org.robotlegs.base::MediatorMap/createMediatorUsing()[/Users/dj/Documents/new_fb_projects/VoxCloud/src/org/robotlegs/base/MediatorMap.as:294] at org.robotlegs.base::MediatorMap/onViewAdded()[/Users/dj/Documents/new_fb_projects/VoxCloud/src/org/robotlegs/base/MediatorMap.as:275] at flash.display::DisplayObjectContainer/addChildAt() at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$addChildAt()[E:\dev\hero_private\frameworks\projects\framework\src\mx\core\UIComponent.as:7278] at mx.core::UIComponent/addChildAt()[E:\dev\hero_private\frameworks\projects\framework\src\mx\core\UIComponent.as:7184] at spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\Group.as:2037] at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\Group.as:1628] at spark.components::Group/addElementAt()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\Group.as:1387] at spark.components::Group/addElement()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\Group.as:1345] at spark.components::SkinnableContainer/addElement()[E:\dev\hero_private\frameworks\projects\spark\src\spark\components\SkinnableContainer.as:761] at spark.components::ViewNavigator/createViewInstance()[E:\dev\hero_private\frameworks\projects\mobilecomponents\src\spark\components\ViewNavigator.as:1931] at spark.components::ViewNavigator/commitNavigatorAction()[E:\dev\hero_private\frameworks\projects\mobilecomponents\src\spark\components\ViewNavigator.as:1849] at spark.components::ViewNavigator/commitProperties()[E:\dev\hero_private\frameworks\projects\mobilecomponents\src\spark\components\ViewNavigator.as:1220] at mx.core::UIComponent/validateProperties()[E:\dev\hero_private\frameworks\projects\framework\src\mx\core\UIComponent.as:8206] at mx.managers::LayoutManager/validateProperties()[E:\dev\hero_private\frameworks\projects\framework\src\mx\managers\LayoutManager.as:597] at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\hero_private\frameworks\projects\framework\src\mx\managers\LayoutManager.as:813] at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\hero_private\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1180]

reduxdj commented 13 years ago

I've added you as an admin on my project to help you fix your bug, to reproduce the error, uncomment out line 28 of https://github.com/reduxdj/VoxCLOUD/blob/master/src/net/voxel/voxcloud/view/mediator/LoginMediator.as

reduxdj commented 13 years ago

The problem seems to be that I don't know how to use injection, i was injecting a class where an interface belonged. Will check back and let you know if this resolves my problem.

ZackPierce commented 12 years ago

Did you resolve your problem? If not, I would suggest taking a look at this description of the concept of injection with AS3 examples or reading through the Robotlegs best practices.

reduxdj commented 12 years ago

I totally resolved that it was a lower case work "inject" instead of uppercase, also i had a problem with some interfaces and concrete classes being switched.

On Mon, Jun 20, 2011 at 10:47 PM, ZackPierce reply@reply.github.com wrote:

Did you resolve your problem? If not, I would suggest taking a look at this description of the concept of injection with AS3 examples or reading through the Robotlegs best practices.

Reply to this email directly or view it on GitHub: https://github.com/tschneidereit/SwiftSuspenders/issues/53#issuecomment-1407577

tschneidereit commented 12 years ago

Sorry for not replying earlier - I'm glad that you were able to figure the problem out yourself.