tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/337-referenceerror-error-1065-variable-iinjector-is-not-definedRobotlegs: Discussion 2018-10-18T16:35:29Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/81642372011-06-24T20:50:04Z2011-06-24T20:50:05ZReferenceError: Error #1065: Variable IInjector is not defined.<div><p>OK, so I decided to try getting the source to RL and replacing
SwitftSuspenders with the latest. Unfortunately, when I try to dl
swiftSuspenders 1.6.0, I get</p>
<p><br>
<code>AccessDenied</code><br>
Access Denied<br>
8412FCB65163A93D<br>
<br>
CgLfnuMZtEMQfBDxzyoDUg1nYSJKhNDWtUiTT6EhoIuSt5ZTAqx45D/LUfQbzRqw<br>
<br></p>
<p>I can download the previous version with no problem. I'd rather
not have to have my project compile both SS and RL. Can anyone send
me the swc for SwiftSuspenders at amy at magnoliamultimedia dot
com?</p>
<p>Thanks;</p>
<p>Amy</p></div>Amytag:robotlegs.tenderapp.com,2009-10-18:Comment/81642372011-06-24T20:58:05Z2011-06-24T20:58:05ZReferenceError: Error #1065: Variable IInjector is not defined.<div><p>Update: I found the swc in the full zip, and I tried it. Still
getting the error.</p>
<p>Thanks;</p>
<p>Amy</p></div>Amytag:robotlegs.tenderapp.com,2009-10-18:Comment/81642372011-06-25T07:33:54Z2011-06-25T07:33:54ZReferenceError: Error #1065: Variable IInjector is not defined.<div><p>AFAIK it is mandatory to extend ModuleContext. This definitely
has something to do with application domains. Do you load the
module in its own application domain or in the main application's
application domain?</p></div>creynderstag:robotlegs.tenderapp.com,2009-10-18:Comment/81642372011-06-25T17:15:32Z2011-06-25T17:15:32ZReferenceError: Error #1065: Variable IInjector is not defined.<div><p>I'm trying to avoid adding yet another library to my project. I
did not touch the ApplicationDomain, just let ModuleLoader do
whatever it does (because I will not have any control over what the
ModuleLoader does that will load it in the real world). I didn't
dig into ModuleLoader's source code to see what it does.</p>
<p>I am mystified as to why this would be necessary, though, since
the main application knows nothing about RobotLegs. I thought
Modules should only become an issue if RobotLegs is loaded from the
main app or another module first.</p>
<p>creyenders (do you have a real name you're willing to share?),
do you have any insight into the whys and wherefores of why it
would be mandatory in this situation, so I can figure out exactly
how much meaning "AFAIK" really has?</p>
<p>Thanks;</p>
<p>Amy</p></div>Amy Blankenshiptag:robotlegs.tenderapp.com,2009-10-18:Comment/81642372011-06-26T16:55:42Z2011-06-26T16:55:44ZReferenceError: Error #1065: Variable IInjector is not defined.<div><p>OK, I tried extending ModuleContext instead of Context, and it
did work. However, I'm still not clear on why this would be
necessary, since the main application domain has no idea RobotLegs
even exists.</p>
<p>One thing I found that was strange was that I would get
different variables not defined. I rearranged my mapInjections, and
then I'd get ICommandMap not defined. If I added
SwiftSuspendersInjector(injector).setApplicationDomain(contextView.loaderInfo.applicationDomain);
in the constructor, I would get IMediatorMap not defined.</p>
<p>Without spending a lot of time debugging, it suggests to me
that, even with adding this, somehow the injector might have wound
up with two different ApplicationDomains in that second scenario.
Is it remotely possible that this could be related to all the
injection mapping warnings (whatever logic in there is running
twice, could it somehow have created two injectors with different
domains)?</p>
<p>One thing I did notice is that Flex creates the
ApplicationDomain differently for Flex 4 projects than Flex 3
projects. It seems to me that this might well be revealing an issue
in Robotlegs 1.4 (which was supposed to fix basic modular problems)
that wasn't caught in testing. Also, I haven't looked at your tests
(deadlines and all), but did you test for a scenario where
Robotlegs was used in a module but <em>not</em> in the parent
Application?</p>
<p>If possible, I'd really like to get rid of the Modular Utilities
from my project--I don't need most of what it offers. I just need
my module to run without breaking.</p>
<p>Thanks;</p>
<p>Amy</p></div>Amytag:robotlegs.tenderapp.com,2009-10-18:Comment/81642372011-06-27T07:26:20Z2011-06-27T07:26:20ZReferenceError: Error #1065: Variable IInjector is not defined.<div><p>There's been a lot of problems with the application domains in
RL and SS, so I've got a bit of a hard time remembering the entire
track of problems/solutions, that's why I recommended using the
ModuleContext even though it's not (or should not be)
necessary.</p>
<p>If I've got time today I'm gonna spike to see what's going on
and how it possibly could be solved w/o using the modular
utilities.</p></div>creynderstag:robotlegs.tenderapp.com,2009-10-18:Comment/81642372011-06-27T12:04:20Z2011-06-27T12:04:21ZReferenceError: Error #1065: Variable IInjector is not defined.<div><p>OK, thanks :). I have something that will get this project out
the door on deadline, which is good enough for now.</p></div>Amytag:robotlegs.tenderapp.com,2009-10-18:Comment/81642372011-06-28T07:33:01Z2011-06-28T07:33:01ZReferenceError: Error #1065: Variable IInjector is not defined.<div><p>Sorry, haven't had the time to spike it and it doesn't look like
that will change this week. I'm sure the GOF (Gang Of Five :) )
will look into it when they return from Spain.</p></div>creynders