property reason

(r/o) int32 reason;

Typ

Zugriff

This property returns the reason why the SystemEvent is fired. This value can be :
<window on:system="onSystem();"/>

function onSystem()
{
    var eventObj = shell.currentEvent;
    if (eventObj)
    {
        if (eventObj.reason == 1)
        {
            shell.print("shutting down soon");
        }
    }
}