You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.
We created a RobotLegs SWF (with SwiftSuspenders) and it worked fine standalone. However, when loading this into another Robotlegs SWF (also with SwiftSuspenders) in a child ApplicationDomain at runtime, injection failed in the child SWF, throwing the following exception:
Exception fault: ReferenceError: Error #1065: Variable MyClassView 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]
So it seems that when a RobotLegs SWF using SwiftSuspenders loads another RobotLegs SWF using SwiftSuspenders in a child ApplicationDomain, injection breaks completely - it seems as though SwiftSuspenders is using the injector/injection settings from the parent domain?
Loading the SWF into the same ApplicationDomain does work, however this does open up other problems for us. We can use this as a workaround for now, but it would be great to find out whether we're doing something wrong, or whether this is an issue with SwiftSuspenders (or indeed RobotLegs). Our investigation has led us to believe this is an issue with SwiftSuspenders.
Is anyone familiar with this problem?
Hope someone can help,
Mani
The text was updated successfully, but these errors were encountered:
I did load an external robotlegs module in a child Application Domain and it worked.
e.g.
in the mainApp:
load external SWF which is a RobotLegs Module passing a new LoaderContext with a child domain of the current ApplicationDomain.
var childDomain:ApplicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
var context:LoaderContext = new LoaderContext(false, childDomain);
Once the module has loaded you need to pass through the parent injector, which is the injector of the mainAppContext.
In the RobotLegs Module you then pass the following to the constructor of the ModuleContext:
context = new YourContext(this, true, rootInjector, ApplicationDomain.currentDomain);
In this case ApplicationDomain.currentDomain refers to the currentDomain of the swf which is the childDomain we passed in the LoaderContext.
So now your robotlegs module is in its own ApplicationDomain, even though it's a child domain of the mainApp ApplicationDomain.
In this way the Robotlegs module can access the class definitions specified in the mainApp ApplicationDomain.
It worked for us, now we load external Robotlegs modules with no issues.
We created a RobotLegs SWF (with SwiftSuspenders) and it worked fine standalone. However, when loading this into another Robotlegs SWF (also with SwiftSuspenders) in a child ApplicationDomain at runtime, injection failed in the child SWF, throwing the following exception:
Exception fault: ReferenceError: Error #1065: Variable MyClassView 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]
So it seems that when a RobotLegs SWF using SwiftSuspenders loads another RobotLegs SWF using SwiftSuspenders in a child ApplicationDomain, injection breaks completely - it seems as though SwiftSuspenders is using the injector/injection settings from the parent domain?
Loading the SWF into the same ApplicationDomain does work, however this does open up other problems for us. We can use this as a workaround for now, but it would be great to find out whether we're doing something wrong, or whether this is an issue with SwiftSuspenders (or indeed RobotLegs). Our investigation has led us to believe this is an issue with SwiftSuspenders.
Is anyone familiar with this problem?
Hope someone can help,
Mani
The text was updated successfully, but these errors were encountered: