Function alert()

function martax.alert(

message: String,

description: String = "",

buttons: [String | Array] = "Close",

style: String

): Int

Display an alert dialog with a given message and description.

description is displayed below the message. It has a slightly smaller font size. Put additional information to the description. In case of simple alerts, you may leave it empty.

buttons allows to specify custom button labels. If you pass a string, the alert will have a single button. If you pass an array of strings, the alert will have several buttons. Up to three buttons are supported.

style allows to specify an alert style. Supported values are: critical, warning and informational.

Returns the index of a clicked button (1 for the first button).


    "Do you want to delete 'a.txt'?",
    "Deletion is permanent. You will not be able to restore the file.",
    {"Ok, "Cancel"},