Reputation: 118
I'm working on an existing modular project that was built in PureMVC. Instead of converting everything over to RobotLegs, I want to create a new module using RobotLegs and plug it into the pureMVC shell. Currently, when the module loads, I get the following flash error:
ReferenceError: Error #1065: Variable IMediatorMap is not defined.
Inititally, I thought it was because my module needed a pureMVC Mediator to call the pureMVC StartupCommand to get things "hooked up" and THEN create the RobotLegs' Context. However, that didn't work and I'm still getting the error. Do you have any idea what's going on and if so, how I can get pass it?
Thanks.
Upvotes: 1
Views: 516
Reputation: 118
Okay -- so I was reading all over the place and trying to figure out what was the matter. In RobotLegs' support discussion, there was a similar topic posted. It turned out that there was a bug in RL's framework, something to do with the ApplicationDomain. Read here:
http://knowledge.robotlegs.org/discussions/problems/160-child-applicationdomains-break-the-injector
Well, the solution on that post was to use RL v.1.3.0, which I was. But following that line of thought, I removed the library reference of SwiftSuspender-1.5.1.swc in the RL's lib/ folder, and downloaded SwiftSuspender from GitHub instead. It's also v.1.5.1, but for whatever reason, the one from GitHub works. I replaced the one that came with RL's framework with the one I got from GitHub and now it runs without errors.... for now.
Thanks. :)
Upvotes: 1
Reputation: 744
I don't believe your problem has anything to do with PureMVC or RobotLegs. It sounds like your RobotLegs module does not contain the RobotLegs library and neither does your main application. Your module is not linking in the RobotLegs .swc. If you are adding the RobotLegs .swc to the main application but never using it, then the classes will not be compiled into the application. The mxmlc and Flash/Flex Builder compilers do not include classes into a SWF that are not used.
To solve this, you can force the entire library to be included by using the -include-libraries option in the main application. You could also change the link options on the module to "Merged into code" to include the RobotLegs .swc there.
Upvotes: 1