Im kinda new to the Flex environment and I was wondering how to do this scenario:
My initial code goes like this:
public function displayAllNames(event:ResultEvent):void {
var result:ArrayCollection = new ArrayCollection();
result = event.result as ArrayCollection;
if (result.length != 0){
listBox.dataProvider = result;
}
}
event.result is an ArrayCollection of Person class that has the name attribute
listBox is the id of the List Component in Flex where the names are going to be displayed
When I tried to run the code, the listbox did show something. But instead of the names, it displayed object Object all throughout. It seems like I still have to do something with event.result first so that it would be an ArrayCollection of Person class.