Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RemoteClass alias missing from compiled Modules #190

Open
Laturine opened this issue Jul 2, 2021 · 0 comments
Open

RemoteClass alias missing from compiled Modules #190

Laturine opened this issue Jul 2, 2021 · 0 comments

Comments

@Laturine
Copy link

Laturine commented Jul 2, 2021

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

MXMLJSC
+royalelib=c:\apache_royale_nightlies\3064\apache-royale-0.9.8-bin-js\royale-asjs\frameworks
--debug=true
--source-path+=src/main/royale
--targets=JSRoyale
--load-config+=tbt-defines.xml
--default-frame-rate=60
--default-background-color=#FFFFFF
--default-size
800
600
--keep-as3-metadata+=Bindable
--show-unused-type-selector-warnings=true
--verbose-stacktraces=false
--accessible=false
--strict=true
--benchmark=false
--static-link-runtime-shared-libraries=false
--use-network=true
--use-resource-bundle-metadata=true
--warnings=true
--optimize=false
+configname=flex
--

a small test case

main.mxml mx.core.Application

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant