我正在尝试用 XML 文件中的国家/地区填充组合框。不幸的是,组合框没有被填满。我应该如何解决这个问题?提前致谢!
这是我的代码:
protected function navigatorcontent2_creationCompleteHandler(event:FlexEvent):void
{
fillCboCountries.addEventListener(ResultEvent.RESULT, fillCombobox);
fillCboCountries.send();
}
protected function fillCombobox(event:ResultEvent):void
{
cboCountries.dataProvider=event.result.global.countryItem;
}
<fx:Declarations>
<s:HTTPService id="fillCboCountries" url="https://marnixcoosemans2013.dreamhosters.com/scripts/countries_select.php"/>
</fx:Declarations>
<s:ComboBox id="cboCountries" x="10" y="414" width="173" labelField="countryLabel"/>