Tim,

Maybe I'm missing something here, but to my understanding when the result event 
of your HTTP service fires, your call IS complete.  You should have access to 
the json string that was pulled back from the service.  Is there something else 
you need that the json string doesn't' supply?

Jeff
________________________________
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Tim Romano
Sent: Tuesday, January 12, 2010 2:53 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] HTTPService Responder ResultEvent -- how to know when the 
JSON data sent via HTTP are complete?




I started learning FlashBuilder/Flex by diving in and writing an AIR 
application against SQLite with asynchronous connections and Responder objects. 
The responder's resultsHandler is passed a flash.data.SQLResult object that 
exposes a "complete" status property.  Lovely.

Now I am trying to rewrite that AIR application as a browser-deployed Flex app 
using an HTTPService against a RESTful webservice that returns JSON data. The 
webservice is working, and the Flex HTTPService is pulling the JSON string 
down, but there doesn't seem to be anything analogous to the "complete" 
property that was available with the asynch data connection in the AIR app.  
Not so lovely.

The result-handler specified in the HTTPService responder has two parameters, 
the ResultEvent and the AsyncToken. The ResultEvent exposes a statusCode 
property. The result-handler can be called more than once. The 
ResultEvent.statusCode = 200 each time the handler is called. How do you know 
when the remote data are "complete"?

I will keep googling as I'm sure this question must be commonplace, but so far 
I haven't found the answer.

Thanks for the help.




Reply via email to