Let's say I have a class MYHTTPSERVICEBASE which extends
mx.rpc.http.HTTPService. This base class of mine checks whether it is
being run in debug mode or release, and sets the base URL to localhost
or the remote host. Then I have individual http service classes that
extend MYHTTPSERVICEBASE.
I want my http service layer to dispatch messages that my GUI layer will
be listening for:
public function execute() : void {
myResponder = new AsyncResponder(onResult, onFault);
this.resultFormat= HTTPService.RESULT_FORMAT_TEXT;
var token: AsyncToken = this.send();
token.addResponder(myResponder);
}
private function onResult(e:ResultEvent, token:Object=null):void {
// Got Data? then instantiate and dispatch a bubbling event
object that encapsulates the data
// the GUI layer will be listening for this event
}
Questions:
Can the event object be dispatched from within the MYHTTPSERVICEBASE?
Will the GUI hear it if it's dispatched from the base class?
In a class that extends MYHTTPSERVICEBASE, can I override the onResult()
method that has been registered with the Responder by the base class?
Thanks for the help!