我在使用此代码时遇到问题,我不知道是什么Language.synthType
...
使用的 SDK 是 0.9.6
<j:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:local="*"
xmlns:models="models.*"
xmlns:js="library://ns.apache.org/royale/basic"
xmlns:j="library://ns.apache.org/royale/jewel"
xmlns:binding="org.apache.royale.binding.*"
applicationComplete="ev_applicationComplete()">
<fx:Script>
<![CDATA[
import org.apache.royale.collections.ArrayList;
private function ev_applicationComplete():void {
dg.dataProvider = new ArrayList( [
{label:'Apple',code:'1'},
{label:'Nuts',code:'2'}
]);
}
]]>
</fx:Script>
<js:valuesImpl>
<js:SimpleCSSValuesImpl />
</js:valuesImpl>
<js:initialView >
<j:View>
<j:beads>
<js:ContainerDataBinding/>
</j:beads>
<js:DataGrid id="dg" width="600" height="300">
<js:columns>
<js:DataGridColumn label="Label" dataField="label" columnWidth="300" />
<js:DataGridColumn label="Code" dataField="code" columnWidth="300"/>
</js:columns>
</js:DataGrid>
</j:View>
</js:initialView>
</j:Application>
运行代码时抛出此问题
EventDispatcher.js:74 Uncaught TypeError: org.apache.royale.utils.Language.synthType is not a function
at org.apache.royale.html.beads.DataGridView.handleInitComplete (DataGridView.js:88)
at org.apache.royale.html.DataGrid.goog.events.EventTarget.fireListeners (eventtarget.js:284)
at Function.goog.events.EventTarget.dispatchEventInternal_ (eventtarget.js:382)
at org.apache.royale.html.DataGrid.goog.events.EventTarget.dispatchEvent (eventtarget.js:196)
at org.apache.royale.html.DataGrid.org.apache.royale.events.EventDispatcher.dispatchEvent (EventDispatcher.js:71)
at org.apache.royale.html.DataGrid.org.apache.royale.core.HTMLElementWrapper.dispatchEvent (HTMLElementWrapper.js:245)
at org.apache.royale.html.DataGrid.addedToParent (DataGrid.js:58)
at org.apache.royale.jewel.View.org.apache.royale.core.UIBase.addElement (UIBase.js:414)
at org.apache.royale.jewel.View.org.apache.royale.core.GroupBase.addElement (GroupBase.js:165)
at Function.org.apache.royale.utils.MXMLDataInterpreter.org_apache_royale_utils_MXMLDataInterpreter_initializeStrandBasedObject (MXMLDataInterpreter.js:236)