Difference between revisions of "EventDispatcher:addEventListener"

From GiderosMobile
(----)
Line 14: Line 14:
 
'''data''': (any) An optional data parameter that is passed as a first argument to the listener function. '''optional'''<br/>
 
'''data''': (any) An optional data parameter that is passed as a first argument to the listener function. '''optional'''<br/>
  
----
+
{{EventDispatcher}}
{{Special:PrefixIndex/EventDispatcher}}
 
<br/>
 
 
 
{{Special:PrefixIndex/Event.APPLICATION}}
 
{{Special:PrefixIndex/Event.MEMORY}}
 
{{Special:PrefixIndex/Event.OPEN}}
 
<br/>
 

Revision as of 02:34, 3 December 2019

Available since: Gideros 2011.6
Class: EventDispatcher

Description

Registers a listener function and an optional data value so that the listener function is called when an event of a particular type occurs.

EventDispatcher:addEventListener(type,listener,data)

Parameters

type: (string) The type of event.
listener: (function) The listener function that processes the event.
data: (any) An optional data parameter that is passed as a first argument to the listener function. optional