Also, check to see if there is only one record. I discovered some time ago
when I ask for a list from my web service but there was only one result
instead of a list that it failed. And so I had to test to see the result
was a list or not. If it was not a list, then I had to use the
event.result and assign each value to the object.
dataList = new ArrayCollection();
if (event.result != null)
{
if (event.result is ArrayCollection)
{
dataList = getAsResult.lastResult;
}
else
{
dataList.addItem(toDTO(event.result));
}
}
}
public function toDTO(o:Object):ADTO
{
var thisDTO:ADTO = new ADTO();
thisDTO.id = o.id;
thisDTO.name = o.name;
return thisDTO;
}
--
View this message in context:
http://apache-flex-users.2333346.n4.nabble.com/Receiving-ObjectProxy-tp8989p9047.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.