I’ve made the leap into the world of Flex in the last day or so, and so am going through the process of “Flexing” concepts I know from other languages. I’m going to make a note of all of them because I think they’re handy to know.
Tonight while trying to workout some functionality related to web services I found I needed to delve into the data being retrieved, the need for the ever handy CFDUMP came to mind. A look around showed that there doesn’t appear to be anything as user friendly as CFdump in Flex, but I cam across this article on ObjectUtil.
Basically you can use the ObjectUtil class to dump trace data (including complex objects) to the debug window thus:
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.managers.PopUpManager;
import mx.utils.ObjectUtil;
private function remotingCFCHandler(e:ResultEvent):void
{
//Dump the result of a call to a webservice
trace( ObjectUtil.toString( e.result ) );
}
]]>
</mx:Script>
Which will while not quite CFDUMP will provide you (hopefully) with enough data to move past your problem.