Error 1065

WaZz's Avatar

WaZz

15 Jul, 2010 06:47 PM

I am trying to load an external SWF which was build with RL framework into another SWF build with RL.

I got this error and I can't figure out how to fix it :
ReferenceError: Error #1065: Variable org.robotlegs.base:ContextBase::injector is not defined.

This discussion was closed! See this FAQ for more information:

  1. ERROR: Injector is missing a rule to handle injection into target

    This error means that the injector has not been provided with an appropriate mapping to provide the dependency.

    Please see the Using Injectors section of the best practices documentation.

    See more..
  1. 1 Posted by WaZz on 15 Jul, 2010 06:49 PM

    WaZz's Avatar

    Sorry, click where I shouldn't but the bug is still occuring.

  2. Support Staff 2 Posted by Shaun Smith on 15 Jul, 2010 07:55 PM

    Shaun Smith's Avatar

    Do both SWF files run fine stand-alone (ie, no errors)? What versions of RL did they use?

  3. 3 Posted by WaZz on 16 Jul, 2010 01:52 PM

    WaZz's Avatar

    If I use Context instead of ModuleContext with the same RL version (1.1.1) I have another error :
    ReferenceError: Error #1065: Variable ApplicationModel is not defined.

    at flash.system::ApplicationDomain/getDefinition()
    at org.swiftsuspenders.injectionpoints::PropertyInjectionPoint/initializeInjection()[/Users/tschneidereit/dev/swiftsuspenders/swiftsuspenders/src/org/swiftsuspenders/injectionpoints/PropertyInjectionPoint.as:58]
    at org.swiftsuspenders.injectionpoints::InjectionPoint()[/Users/tschneidereit/dev/swiftsuspenders/swiftsuspenders/src/org/swiftsuspenders/injectionpoints/InjectionPoint.as:19]
    at org.swiftsuspenders.injectionpoints::PropertyInjectionPoint()[/Users/tschneidereit/dev/swiftsuspenders/swiftsuspenders/src/org/swiftsuspenders/injectionpoints/PropertyInjectionPoint.as:31]
    
  4. Support Staff 4 Posted by Shaun Smith on 16 Jul, 2010 02:05 PM

    Shaun Smith's Avatar

    Hi WaZz,

    It's very difficult to tell what's going on without knowing more. Would you be able to build a tiny, stripped-down example (just a couple of files) that replicates the problem you are having?

  5. 5 Posted by WaZz on 16 Jul, 2010 02:48 PM

    WaZz's Avatar

    Here it is

  6. Support Staff 6 Posted by Shaun Smith on 16 Jul, 2010 03:06 PM

    Shaun Smith's Avatar

    Hi WaZz,

    That's not really a stripped-down version, but I'll try make some time to look through it. By stripped-down I meant the fewest files possible to demonstrate the problem. Anyhow, first thing I noticed was this:

    // In ProjectContext, startup:
    injector.mapSingleton(ApplicationModel);
    var appModel:ApplicationModel = injector.instantiate(ApplicationModel);
    appModel.local = _local;
    

    The problem there is that injector.instantiate() does not return a container managed instance - it simply, and forcefully, instantiates a new instance (ie, it won't be the same instance injected into other parts of the system). You should be using injector.getInstance() which will return an instance based on your mapping. See these asdcos for reference:

    http://github.com/robotlegs/robotlegs-framework/blob/v1.1.1/src/org...

    This may or may not be causing problems for you - I'll need more time to go through your source in full (a little busy right now).

    Also, are you wanting to communicate between these two contexts?

  7. 7 Posted by WaZz on 16 Jul, 2010 03:17 PM

    WaZz's Avatar

    Yes, in my project, I have set an interface

  8. 8 Posted by WaZz on 27 Jul, 2010 09:06 PM

    WaZz's Avatar

    Sorry for the delay, but that did not fix the problem....

  9. Stray closed this discussion on 10 Feb, 2011 05:30 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac