Anybody, please, any idea?
--- In [email protected], "markgoldin_2000"
<[EMAIL PROTECTED]> wrote:
>
> I am building a common library to shre it between diffrent
projects.
> First of all it will be used for data access. I am using
HTTPService
> for all my data needs. Data retrival is a generic operaton, but
data
> processing is not. I need to provide a custom callback function for
> each service.send(parameters) result. I am defining a callback for
> service itself:
> service.addEventListener("result", httpResult);
>
> private function httpResult(event:ResultEvent):void
> {
> var result:Object = event.result;
> var xmlResult:XML = XML(result);
>
> // here I need to call a function(xmlResult) that is specified by a
> data requestor which is in a diffrent project.
> }
> I was able to acoomplish (well, sort of) that by having HTTPService
> code and custom callbacks code in one package:
> private function httpResult(event:ResultEvent):void
> {
> var result:Object = event.result;
> var xmlResult:XML = XML(result);
> this[CallbackToRun](xmlResult);
> }
> where CallbackToRun is defined prior the call.
>
> Any idea how to do that?
>
> Thanks
>