property message

(r/o) string message;

Typ

Zugriff

This property returns the message that the event is carrying. The control box who triggers the CommandEvent can have a message attribute, for example, <button message="close"/>. The CommandEvent's message property holds the same value as the control box's message attribute. This message tells the system to perform certain task like closing, minimizing or maximizing the scene.
<button label="minimize" message="minimize" on:command="onCommand();"/>

function onCommand()
{
    var eventObj = shell.currentEvent;
    if (eventObj)
    {
        var message = eventObj.message;
        if (message == "minimize")
        {
            // when this event bubbles up to the root box of the scene, it will minimize the scene.
            // if we stopPropagation here, this event will not bubble up to the root box of the scene
            // and the scene will not be minimized.
            eventObj.stopPropagation();
        }
    }
}