Home › Forums › Presentation › Controls › can we call Class Events from Control or Form › Reply To: can we call Class Events from Control or Form
Yes, the method you are looking for is on the ScriptedController (ScreenController/FormController) in the UI. It is usually accessed as ‘this’ in a screen or form. It comes in two forms, one for instance methods and one for static methods:
(this’invokeMethod classSym method parameters filters commit)
1 2 3 4 5 6 7 8 |
+ScreenController.invokeMethod(classSym method parameters filters commit): any Invokes static method on a class. Arguments classSym symbol Class symbol. method symbol Method symbol to invoke. parameters list List of name, value pairs of parameters. filters list List of active nodes to send filters for. commit boolean Commit flag. |
(this’invokeMethod instance method filters commit)
1 2 3 4 5 6 7 |
+ScreenController.invokeMethod(instance method filters commit): any Invoke a non-static method on a class. Arguments instance any The class instance method symbol Method symbol to invoke. filters list List of active nodes to send filters for. commit boolean Commit flag. |
As with all of our scripting help, this information is available in NexJ Studio by hovering over the method name in code. Also, just by pressing the ‘ character after ‘this’ in a screen or form will give you a list of all of the available methods and their documentation.