Populating a combobox with XML in Flex

caddyshack

New Member
I'm trying to fill a combobox with countries from a XML file. Unfortunately, the combobox does not get filled. How should I resolve this problem? Thanks in advance!Here's my code:\[code\]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"/>\[/code\]
 
Back
Top