setEventMapping(eventName: String; mappedName: String);
The setEventMapping method of the Window class and ActiveXControl class enables the method that is executed for an event in this window to be dynamically set at run time. This method enables a form to be dynamically constructed and the event methods to be defined at run time.
This method is equivalent to the setEventMappingEx method but it is less efficient, as it must find the methods by name. You should therefore use the setEventMappingEx method to improve performance.
By default, the JADE development environment allows the definition of event methods for a form (event-name), and for controls on the form (control-name_event-name). For example:
bInvestors_click(btn: Button input) updating;
The parameters of the setEventMapping method are listed in the following table.
Parameter | Description |
---|---|
eventName | Must be a defined event name for the form or control; for example, click. |
mappedName | The name of the method that is to be called. This method must exist on the form that is the parent of the control for which you are calling the setEventMapping method or a method of the form that is calling the setEventMapping method. |
The method checks that:
The event method is valid for the window
The method to be called exists
The signature of the method matches the event method signature