1

New to Royale, copied checkbox mxml code from Tour de Jewel to learn Royale. Compilation with errors.

Followed instruction from https://github.com/BowlerHatLLC/vscode-as3mxml/wiki/Install-the-ActionScript-and-MXML-extension-for-Visual-Studio-Code and setup VSCode successfully.

Compilation error:
MXMLJSC
+royalelib=d:\Apps\Installations\apache-royale-0.9.6-bin-js\royale-asjs\frameworks
--debug=true
--targets=JSRoyale
--source-map=true
--
src/Main.mxml
d:\Workspace\VSProjects\Project02\src\Main.mxml(13): col: 10 Error: In initializer for 'j:initialView', type org.apache.royale.jewel.Card is not assignable to target type 'org.apache.royale.core.IApplicationView'.

<j:Card width="350">
^

1.319005 seconds
The terminal process terminated with exit code: 3


<j:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
    xmlns:j="library://ns.apache.org/royale/jewel" 
        xmlns:html="library://ns.apache.org/royale/html" 
        xmlns:js="library://ns.apache.org/royale/basic">

<j:valuesImpl>
    <js:SimpleCSSValuesImpl />
</j:valuesImpl>

<j:initialView>
     <j:Card width="350">
        <html:H3 text="Jewel CheckBox"/>

        <j:CheckBox text="Not Checkbox"/>

        <j:CheckBox text="Checked" selected="true"/>

        <j:CheckBox text="Disabled">
            <j:beads>
                <j:Disabled/>
            </j:beads>
        </j:CheckBox>

        <j:CheckBox text="Checked And Disabled" selected="true">
            <j:beads>
                <j:Disabled/>
            </j:beads>
        </j:CheckBox>
    </j:Card>
</j:initialView></j:Application>
dennislee
  • 65
  • 1
  • 8
  • Hi David, how you're building? ANT? Maven? IDE?. Can you edit the missing line (j:Application) to the code so its clear that's not the problem?. Thanks. – Carlos Rovira Jun 27 '19 at 15:59
  • Hi, Carlos, I use IDE. Missing line has been added. Still got compilation error, – dennislee Jun 28 '19 at 02:43
  • Hi, Carlos, I use JSOnly Nightly Build apache-royale-0.9.6-bin-js as the selected Workspace SDK. Please note the Error: In initializer for 'j:initialView', type org.apache.royale.jewel.Card is not assignable to target type 'org.apache.royale.core.IApplicationView'. If I removed the 'j:initialView', compilation will be successful but nothing will be displayed in Chrome browser when the generated index.html is executed. – dennislee Jun 28 '19 at 03:13

1 Answers1

1

You missed j:View:

    <j:initialView>
        <j:View>
            <j:Card/>
        </j:View>
    </j:initialView>
Carlos Rovira
  • 507
  • 2
  • 11