Hi,
can I somehow check if a certain method (global) excist?
in the world of modules, (sometimes present, sometimes not) I want to check if a certain method excist, so I can provide information, instead of showing a default Servoy-error.
possible?
Hi,
can I somehow check if a certain method (global) excist?
in the world of modules, (sometimes present, sometimes not) I want to check if a certain method excist, so I can provide information, instead of showing a default Servoy-error.
possible?
OF COURSE! This is Servoy!
if(globals.myMethod() != undefined)
{
//is there
}
WOW, that’s quick!
COOL!
small correction:
if(globals.myMethod != undefined)
{
//is there
}
(no ‘()’ after myMethod or else you’ll get an error)
I think if(methodname) should work too.