Difference between revisions of "EventDispatcher:hasEventListener"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === <br /> Checks if the `EventDispatcher` object has a event listener registered for the specified type o...")
 
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
 
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 +
'''Class:''' [[EventDispatcher]]<br/>
 +
 
=== Description ===
 
=== Description ===
<br />
+
Checks if the [[EventDispatcher]] object has an event listener registered for the specified type of event.
Checks if the `EventDispatcher` object has a event listener registered for the specified type of event.<br />
+
 
<br />
+
<syntaxhighlight lang="lua">
<source lang="lua">
+
(bool) = EventDispatcher:hasEventListener(type)
(bool), = EventDispatcher:hasEventListener(type,)
+
</syntaxhighlight>
</source>
+
 
'''type:''' (string) The type of event. ''''''<br/>
+
=== Parameters ===
'''Returns''' (bool) A value of `true` if a listener of the specified type is registered; `false` otherwise.<br/>
+
'''type''': (string) The type of event.<br/>
 +
 
 +
=== Return values ===
 +
'''Returns''' (bool) A value of ''true'' if a listener of the specified type is registered; ''false'' otherwise.<br/>
 +
 
 +
{{EventDispatcher}}

Latest revision as of 14:27, 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.

(bool) = EventDispatcher:hasEventListener(type)

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.