Monday, March 26, 2012

callBaseMethod

hi,

I have a base class and another class inherit from it. How do I call a method with parameter in the base class?

so far, i've seen example where you can call the base method like so

callBaseMethod(this,'[methodname]');

but my methodname in the baseclass has parameters, i need to pass values into
it when i call.

any advice is appreicated.

thanks

You can do it like so:

callBaseMethod(this, {method_name},[Array_of_values_to_pass]);

so, copying from one of the supplied javascript files, here is an example:

callBaseMethod(this, 'set_ClientState',[value]);

This calls the'set_ClientState' property (which is really a method/function), passing the variable 'value' as a parameter.


Hi Glav,

Thanks!! Really really appreicate that. It works :)

Liming

No comments:

Post a Comment