主文件:
<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">
<fx:Script>
<![CDATA[
import models.ProductsModel;
import org.apache.royale.html.DataGrid;
import products.Product;
import org.apache.royale.collections.ArrayList;
]]>
</fx:Script>
<js:valuesImpl>
<js:SimpleCSSValuesImpl />
</js:valuesImpl>
<js:initialView >
<j:View>
<j:beads>
<js:ContainerDataBinding/>
</j:beads>
<js:model>
<models:ListsModel id="listModel" />
</js:model>
<j:DropDownList>
<j:beads>
<js:ConstantBinding
sourceID="listModel"
sourcePropertyName="ComponentList"
destinationPropertyName="dataProvider" />
</j:beads>
</j:DropDownList>
</j:View>
</js:initialView>
</j:Application>
我得到的调试错误:this.view is undefined
此错误指向 DropDownListController.js 文件中的以下函数:
org.apache.royale.jewel.beads.controllers.DropDownListController.prototype.selectedHandler = function(event) {
this.model.selectedIndex = (event.index) >> 0;
this.model.selectedItem = event.data;
this.view.host.dispatchEvent(new org.apache.royale.events.Event(org.apache.royale.events.Event.CHANGE));
};
关于为什么抛出此异常的任何想法?