Event¶
Note
Event is derived from Object class.
An event is a structure holding information about an event passed to a callback or member function. Event is used to be a multipurpose event object, and is an abstract base class for other event classes.
Constructor¶
Event class has a single constructor:
object Event:new ( string sEventName, object oEventSender, function fDefEventHandler )
Inherited Methods¶
These methods are inherited from its super classes:
| Class Method | Description |
|---|---|
| Object:getID | Returns event’s identifier. |
| Object:setID | Sets the event identifier. |
| Object:getName | Returns event’s name. |
| Object:setName | Sets the event name. |
Class Methods¶
These methods are defined by this class.
Event:setSender¶
Sets the object associated to the event.
| bool | Event:setSender ( object oEvtSender ) |
Event:getHandler¶
Returns the event handler function (that is called when you call Event:call).
| function | Event:getHandler() |
Event:call¶
Calls the event handler and pass it all the args.
Returns one value: Returns first value what event handler sents.
| … | Event:call ( … ) |