Click or drag to resize
CoronaRuntimeEnvironmentDispatchEvent Method

Dispatches the given Corona event to Lua to be received by a Lua function.

Lua functions can subscribe to the given event via the Lua Runtime:addEventListener() function.

Namespace: CoronaLabs.Corona.WinRT
Assembly: CoronaLabs (in CoronaLabs.dll) Version: 255.255.255.255
Syntax
public DispatchCoronaLuaEventResult DispatchEvent(
	CoronaLuaEventArgs eventArgs
)

Parameters

eventArgs
Type: CoronaLabs.Corona.WinRTCoronaLuaEventArgs

The Corona event to be dispatched to Lua. Its properties will be passed into Lua as an "event" table.

Cannot be null or else an exception will be thrown.

Return Value

Type: DispatchCoronaLuaEventResult

Returns the result of this Corona event dispatch operation.

Will return a success result if the given Corona event was dispatched to Lua. The result object will also provide the value returned by a Lua event listener function (if any) via its "ReturnedValue" property. Note that a success result does not mean that there were any Lua event listeners subscribed to the given event via the Lua Runtime:addEventListener() function.

Will return a failure result if the Corona runtime has not been started up yet or if the runtime has been terminated. This means that there is no Lua state object available to push the event into.

See Also