EventDispatcher:dispatchEvent

From GiderosMobile
Revision as of 14:26, 13 July 2023 by Hgy29 (talk | contribs) (Text replacement - "<source" to "<syntaxhighlight")

Available since: Gideros 2011.6
Class: EventDispatcher

Description

Dispatches an event to this EventDispatcher instance. <syntaxhighlight lang="lua"> EventDispatcher:dispatchEvent(event) </source>

Parameters

event: (Event) the Event object to be dispatched

Example

<syntaxhighlight lang="lua"> function ButtonTextP9UDDT:onMouseUp(e) if self.focus and self.isclicked then local ec = Event.new("clicked") self:dispatchEvent(ec) -- button was clicked e:stopPropagation() end self.focus = false self.isclicked = false self:updateVisualState() end </source>