MaKa
March 1st, 2004, 08:18 AM
Hi there,
I see that is possible with NetServices call a function that has not been defined, like this.
con = NetServices.createGatewayConnection(url);
service = con.getService(serviceName, responder);
service.getAnyMethod(10,20); // here I call getAnyMethod that has never been defined.
My question is:
How can I handle a call to getAnyMethod if it doesn't exist?
in PHP it's called overload. Converting it to flash, would be like this:
class AnyClass{
function __call(m, a){
// m is the method name
// a are the parameters
}
}
I see that is possible with NetServices call a function that has not been defined, like this.
con = NetServices.createGatewayConnection(url);
service = con.getService(serviceName, responder);
service.getAnyMethod(10,20); // here I call getAnyMethod that has never been defined.
My question is:
How can I handle a call to getAnyMethod if it doesn't exist?
in PHP it's called overload. Converting it to flash, would be like this:
class AnyClass{
function __call(m, a){
// m is the method name
// a are the parameters
}
}