I am relatively new to Flex, and the person who gave me a
jump start provided sample code to do various common things, one of
which was to handle the lastResults from an HTTPService call.
Basically it looks like this;
acVendorSummary.removeAll(); /* clear grid before adding the
add a single record to the grid manually,
this is because an ArrayCollection cannot
be populated from a service call that contains
only a single record
The part that I do not understand is why is the object
returned from the HTTPService request different when there is one
record vs more than one?
you can check if the result is an arraycollection with the
if (vendorSearch.lastResult.DataSet is ArrayCollection )
//yupie it is an arraycollection
// its just an object ?
If its just an object, create an new arraycollection and add
the one item through it as you did, but it should be enough to code