NoMethod Function | |
Identify an invalid method call.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION NoMethod() AS STRING
public static string NoMethod()
Request Example
View SourceReturn Value
Type:
String
A NULL_SYMBOL is returned if such a method does not exist.
Remarks
You can declare a method called NoMethod() for any class which is executed any time a method is invoked that is not defined for that class.
This way you can trap a bad method call before it generates a runtime error.
The NoMethod() function can be called from the NoMethod() method to determine the name of the missing method.
Examples
This example shows the use of NoMethod():
1METHOD NoMethod() CLASS MyDataWindow
2
3
4
5
6SELF:StatusMessage(Symbol2String(NoMethod()) ;
7 + "method not defined", MESSAGEERROR)
See Also