It seems compiling a module strips it's dependencies of
the property alias. Which in turn is causing my module to not be able to
speak with our backend.
How I'm compiling:
with the only difference I'm using the -module-output flag when compiling the module and of course it's filename
public function loadModule():void {
ml.url = "common/testModule"
ml.visible = true;
ml.includeInLayout = true;
}
public function test():void {
var obj :Object = window["common"]["testModule"]; //current WA because module will not instantiate
addChild(obj as IUIComponent);
testModule.mxml mx.modules.Module
creationComplete="onCC()"
import testVO
private var tVO :testVO = new testVO;
public function onCC():void {
trace(tVO) //will not have alias. If you have private var testvo :testVO in main.mxml it will have alias
}
testVO.as
package {
[RemoteClass(alias="com.some.path.as.testVO")]
[Bindable]
public class testVO {
public function testVO {
trace("testVO created");
}
}
}
I noticed royale-compiler/compiler/src/main/java/org/apache/royale/compiler/internl/targets/RoyaleAppSWFTarget.java
is the only file that calls getRemoteClassAlias()
It seems compiling a module strips it's dependencies of the property alias. Which in turn is causing my module to not be able to speak with our backend.
How I'm compiling: with the only difference I'm using the -module-output flag when compiling the module and of course it's filename
a small test case
main.mxml mx.core.Application
testModule.mxml mx.modules.Module
testVO.as
I noticed royale-compiler/compiler/src/main/java/org/apache/royale/compiler/internl/targets/RoyaleAppSWFTarget.java is the only file that calls getRemoteClassAlias()