mrthuanvn / fabrication

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

Interceptors are not getting injections #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Setup an interceptor with a member:

[Inject("productsProxy")]
public var proxy:IProductsProxy;

Setup a dependecy provider as such:

<?xml version="1.0" encoding="utf-8"?>
<fabrication:DependenciesProvider xmlns:fx="http://ns.adobe.com/mxml/2009"     
                                  xmlns:fabrication="http://puremvc.org/utilities/fabrication/2010" xmlns:models="com.st.clients.people.swagbag.core.models.*" xmlns:models1="com.st.clients.people.swagbag.core.views.models.*"> 

    <models:ProductsProxy id="productsProxy"/>
</fabrication:DependenciesProvider>

proxy is null when intercept() is called

Original issue reported on code.google.com by amikhail...@gtempaccount.com on 17 Dec 2010 at 10:42

GoogleCodeExporter commented 9 years ago
FYI, 

The current workaround I used is this:

if (!proxy)
            {
                var p:FabricationDependencyProxy = retrieveProxy(FabricationDependencyProxy.NAME) as FabricationDependencyProxy;
                use namespace fabrication_internal;
                proxy = p.getDependency("productsProxy") as IProductsProxy;
            }

Original comment by a.mikhai...@gmail.com on 6 Jan 2011 at 6:51

GoogleCodeExporter commented 9 years ago
Hi Mikhail,

Did you check this with the newest version? Should work with no problem.

Original comment by rafael.s...@gmail.com on 10 Jan 2011 at 10:12

GoogleCodeExporter commented 9 years ago
Fixed in 0.7.6.4

Original comment by PiotrZarzycki21@gmail.com on 14 Jan 2014 at 11:18