raise
[ Function ]
static raise(
name: string,
...args: any[]
): void;
Triggers an event, based on the event name for all event registrations relating to this event.
Parameter
Name | Type | Description |
---|---|---|
name | Name of the event | |
args [ residual parameters ] | A user-defined number of parameters that are passed through to the event callbacks in addition to the first parameter. |
Return value
Type | Description |
---|---|
void | No return value |
Available from 1.8 |
Sample - JavaScript
// Register event
var destroyEvent = TcHmi.EventProvider.register('MyControl.onMyEvent',
function(evt, data) {
// Do stuff
TcHmi.Log.debugEx('event-data:', data);
// …
// Destroy to free event resources if event is no longer needed.
evt.destroy();
}
);
// Raise event
TcHmi.EventProvider.raise('MyControl.onMyEvent', 42);