I assume you confirm Alex.
Thanks,
Serkan
26.02.2019 22:23 tarihinde Serkan Taş yazdı:
I do not expect you take the control of my code in detail Alex.
I am trying to make my project work, and trying to help to improve the
framework as I can do my best beside.
Here is the hierarchy for HTTPService :
mx.rpc.http.HTTPService extends mx.rpc.AbstractInvoker extends
org.apache.royale.events.EventDispatcher
URLLOader also extends URLLoaderBase extends EventDispacther also.
For my case, progressHandler dispatches first RESPONSE_STATUS then
ValueEvent through the class EventDispatcher. After than the method in
my class, httpResult is called.
It looks like, it is better to override the function in URLLoader. I
appreciate your advice.
Thanks,
Serkan
25.02.2019 23:33 tarihinde Alex Harui yazdı:
I thought you were using HTTPService and not URLLoader until this
morning when I looked more closely at your call stack. I’m not
digging through your code in detail. I’m not sure if HTTPService
wraps the URLLoader or subclasses or what. But fundamentally, you
should be able to override the right dispatchEvent call and send
something else, or possibly be the first listener for an event and
call stopImmediatePropagation and dispatch something else.
HTH,
-Alex
*From: *Serkan Taş <[email protected]>
*Reply-To: *"[email protected]" <[email protected]>
*Date: *Monday, February 25, 2019 at 11:19 AM
*To: *"[email protected]" <[email protected]>
*Subject: *Re: Work on Emulation
You are right Alex,
The dispatch is called in progressHsandler function in class URLLoader.
But I guess there is a misunderstanding.
From your mail I understood that I am going to override the function
in HttpService class not in the URLLoader class.
To make it clear, I am going to override the dispatch event function
in URLLoader, right ?
Thanks,
Serkan
25.02.2019 20:26 tarihinde Alex Harui yazdı:
The call stack indicates that URLLoader's progressHandler calls
dispatchEvent. I would step into that call. If you have properly overridden
URLLoader's dispatchEvent, then it should work.
HTH,
-Alex