Error 1065
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:
-
ERROR: Injector is missing a rule to handle injection into target
See more..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.
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
1 Posted by WaZz on 15 Jul, 2010 06:49 PM
Sorry, click where I shouldn't but the bug is still occuring.
Support Staff 2 Posted by Shaun Smith on 15 Jul, 2010 07:55 PM
Do both SWF files run fine stand-alone (ie, no errors)? What versions of RL did they use?
3 Posted by WaZz on 16 Jul, 2010 01:52 PM
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.
Support Staff 4 Posted by Shaun Smith on 16 Jul, 2010 02:05 PM
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 Posted by WaZz on 16 Jul, 2010 02:48 PM
Here it is
Support Staff 6 Posted by Shaun Smith on 16 Jul, 2010 03:06 PM
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:
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 Posted by WaZz on 16 Jul, 2010 03:17 PM
Yes, in my project, I have set an interface
8 Posted by WaZz on 27 Jul, 2010 09:06 PM
Sorry for the delay, but that did not fix the problem....
Stray closed this discussion on 10 Feb, 2011 05:30 PM.