VSCode 中的 Royale 设置

Royale setup in VSCode

Royale 新手,从 Tour de Jewel 复制复选框 mxml 代码以学习 Royale。编译有错误。

遵循 https://github.com/BowlerHatLLC/vscode-as3mxml/wiki/Install-the-ActionScript-and-MXML-extension-for-Visual-Studio-Code 的说明并成功设置 VSCode。

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>

你错过了j:View

    <j:initialView>
        <j:View>
            <j:Card/>
        </j:View>
    </j:initialView>