Difference between revisions of "EventDispatcher:removeEventListener"

From GiderosMobile
Line 2: Line 2:
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
=== Description ===
 
=== Description ===
<br />
+
<translate><br />
Removes a listener from the `EventDispatcher` object. `removeEventListener()` function expects<br />
+
Removes a listener from the [[[EventDispatcher` object. `removeEventListener()]]] function expects<br />
the same arguments with `addEventListener()` to remove the event. If there is no matching listener<br />
+
the same arguments with [[[addEventListener()]]] to remove the event. If there is no matching listener<br />
 
registered, a call to this function has no effect.<br />
 
registered, a call to this function has no effect.<br />
<br />
+
<br /></translate>
 
<source lang="lua">
 
<source lang="lua">
 
  EventDispatcher:removeEventListener(type,listener,data)
 
  EventDispatcher:removeEventListener(type,listener,data)
 
</source>
 
</source>
 
=== Parameters ===
 
=== Parameters ===
'''type''': (string) The type of event. <br/>
+
'''type''': (string) <translate>The type of event.</translate> <br/>
'''listener''': (function) The listener object to remove. <br/>
+
'''listener''': (function) <translate>The listener object to remove.</translate> <br/>
'''data''': (any) The data parameter that is used while registering the event. <br/>
+
'''data''': (any) <translate>The data parameter that is used while registering the event.</translate> <br/>

Revision as of 13:38, 23 August 2018

Available since: Gideros 2011.6

Description


Removes a listener from the [[[EventDispatcher` object. `removeEventListener()]]] function expects
the same arguments with [[[addEventListener()]]] to remove the event. If there is no matching listener
registered, a call to this function has no effect.

 EventDispatcher:removeEventListener(type,listener,data)

Parameters

type: (string) The type of event.
listener: (function) The listener object to remove.
data: (any) The data parameter that is used while registering the event.