Adobe has changed the contents of the ResultEvent launched by the HTTPService object through design dividing or something-ever.
Take a look at the following example:
var httpService:HTTPService = myHTTPServices.getResults();
httpService.addEventListener(ResultEvent.RESULT,resultHandler);
httpService.send();
function resultHandler(event:ResultEvent):void
{
var httpService = (event.target as HTTPService);
}
It works like a charm with Flex 3.2. But when I try to compile it using Flex 3.5 or Flex 4.0 event.target, since the HTTPService is null.
I realized that event.target is now an instance of HTTPOperation. This is interesting because I cannot find HTTPOperation in langref. However, I think the Flash Builder debugger means mx.rpc.http.Operation.
The debugger also shows that event.target has a private attribute httpService, which is an instance that I expected to receive from event.target. But it is private, therefore event.target.httpService does not work.
EventListener, event.target EventDispatcher. HTTPService.
: HTTPService ResultEvent?
. !
J.