mrthuanvn / fabrication

Automatically exported from code.google.com/p/fabrication
0 stars 0 forks source link

Run-time dependencyProviders swapping #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Is it possible to swap dependencyProviders at run-time?

Original issue reported on code.google.com by a.mikhai...@gmail.com on 29 Sep 2010 at 8:10

GoogleCodeExporter commented 9 years ago
I tried using the approach of:

var dependencyProxy:FabricationDependencyProxy = 
retrieveProxy(FabricationDependencyProxy.NAME) as FabricationDependencyProxy;
dependencyProxy.addDependecyProvider(getServicesProvider(config));

getServicesProvider(config:Object):ServicesProvider;

but i'm running into an issue
"Cannot create property tiersService on 
org.puremvc.as3.multicore.utilities.fabrication.services.ServicesProvider."

which leads me to believe that 

public class ServicesProvider must be dynamic

dynamic class ServicesProvider

by default

Original comment by a.mikhai...@gmail.com on 29 Sep 2010 at 9:48

GoogleCodeExporter commented 9 years ago
Hi, swapping dependiencies is not possible at this time, but this could be 
added. I will think about it in next release, thanks. And yes, you're 100% 
right - ServiceProvider should be dynamic.

Original comment by rafael.s...@gmail.com on 30 Sep 2010 at 10:00

GoogleCodeExporter commented 9 years ago
ServiceProvider is dynamic since 0.7.6.1 version

Original comment by rafael.s...@gmail.com on 13 Oct 2010 at 1:30

GoogleCodeExporter commented 9 years ago
Fixed in 0.7.6.1

Original comment by PiotrZarzycki21@gmail.com on 23 Oct 2013 at 5:04