class NativeProcessExitEvent
package openfl.events
extends Event
Available on AIR, Android, Flash, HashLink, Linux, Neko, Windows, iOS, macOS
This event is dispatched by the NativeProcess object when the process exits. It is possible that this event will never be dispatched. For example, if the child process outlives the OpenFL application that created it, the event will not dispatch.
See also:
Static variables
staticinlineread onlyEXIT:EventType<NativeProcessExitEvent> = "exit"
Defines the value of the type property of a exit event object.
Constructor
new(type:String, bubbles:Bool = false, cancelable:Bool = false, ?exitCodeValue:Float)
Creates a NativeProcessExitEvent which contains specific information regarding a NativeProcess's exit code.
Parameters:
type | The type of the event, accessible as |
---|---|
bubbles | Determines whether the Event object participates in the bubbling stage of the event flow. |
cancelable | Determines whether the Event object can be canceled. |
exitCodeValue | Number that the process returned to the operating system during exit. |
Variables
exitCode:Float
The exit code that the native process returned to the host operating
system when exiting. If the OpenFL application terminates the process
by calling the exit()
method of the NativeProcess object, the
exitCode
property is set to Math.NaN
.
NOTE: On Windows operating systems, if the process has not exited
but the runtime is exiting or an error occurred, this value may be set
to 259
(STILL_ACTIVE). To avoid confusion of this condition, do not
use 259
as a return code in a native process.