VSCode中的Royale设置

时间:2019-06-26 10:16:46

标签: visual-studio actionscript apache-royale

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>

1 个答案:

答案 0 :(得分:1)

您错过了j:View

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