This content has been marked as final. Show 4 replies
First this forum is intended for questions about Flex Builder. Flex language questions should be posted in the Flex General Discussion forum.
The default resultFormat of HTTPService is an mx:Object. Flex takes your xml and converts it to a nested object structure. I personally do not like this and have moved exclusively to resultFormat="e4x" this returns an XML node that is the root of your data.
If you are already using a resultHandler function to receive your data, then you are in good shape, if not, then you will need to implement this in order to do the processing you want.
The [object Object] you see is caused when you are attempting to view a complex object in a control that needs to display a string. this means your reference to the data is not quite right.
I have used the System.setClipboard() call successfully many times. What problem are you having?
I assume the PHP is returning xml? What do you see if you hit the php url directly in a browser?
Tracy - Thank you for taking the time to reply. Sorry about posting to the wrong forum. I was busy reading so many other posts, I just hit the link to add a new topic.
You are right, my first problem was how to use the returned data. I found another post that said to use the e4x format, just like you said and that definitely helped. I found this example on manipulating XML data: http://www.brucephillips.name/blog/index.cfm/2006/10/15/XML-Tutorial-Part-2, which also help.
With all of this, I am able to take the XML output and dump it right into the TextArea for viewing or selecting and copying.
What I'd like to do now though is to pull off the XML tags and just have the straight content so that I can have usable CSV text to copy.
As for the System.setClipboard() call - I guess I didn't have so much trouble with that other than figuring out how to get the data out of my datagrid properly, convert it to a string to create a CSV format and then copy it.
Ok, how is your xml formatted? That will determine exactly how you build your csv string.
Post a bit of the xml and the csv string result you want, and I'll suggest a solution.
Or move this over to General discussion, I don't always check this forum.