Difference between revisions of "EventDispatcher:hasEventListener"
From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight") |
|||
Line 5: | Line 5: | ||
Checks if the [[EventDispatcher]] object has an event listener registered for the specified type of event. | Checks if the [[EventDispatcher]] object has an event listener registered for the specified type of event. | ||
− | < | + | <syntaxhighlight lang="lua"> |
(bool) = EventDispatcher:hasEventListener(type) | (bool) = EventDispatcher:hasEventListener(type) | ||
</source> | </source> |
Revision as of 14:26, 13 July 2023
Available since: Gideros 2011.6
Class: EventDispatcher
Description
Checks if the EventDispatcher object has an event listener registered for the specified type of event.
<syntaxhighlight lang="lua"> (bool) = EventDispatcher:hasEventListener(type) </source>
Parameters
type: (string) The type of event.
Return values
Returns (bool) A value of true if a listener of the specified type is registered; false otherwise.