This class is interesting, it is used to remind users about errors or other unusual circumstances of the screen object, this warning can only as a short message record and reminder, if we need a bit longer, we can use the other screens subclass, the most common is the form. And by the way we mention a class AlertType related to it, it's important to remind the reader that AlertType is a tool class that itself cannot be instantiated. (That is, we can't produce concrete objects like form.)
There are 5 types of AlertType: ALARM (Alert), Confirmation (OK), error (Error), info (information hint), WARNING (warning).
Alert is a special screen object that, when invoked in the Setcurrent () method, emits a warning sound before it appears on the screen, and after a while it automatically jumps back to the previous screen.
What we need to be aware of is that we have to define the screen that it can bounce back before using setcurrent () to display alert, otherwise an exception will occur.
In alert we can use the settimeout () method to set the interval time, SetType () to invoke several of the above mentioned types, setimage () to define the picture, setstring () to define the text, and through the GetType (), GetImage (), getString () to obtain the corresponding object.
You can use settimeout () to define the time that alert () displays, and when alert displays the time interval we specify on the screen, it jumps back to the screen object we specified, or back to the previous screen. If we call settimeout () and pass in the Alert.forveer as a parameter, the screen will always display this alert unless the user presses the specified key. If there is only one command in a timed alert, the command activates automatically when the timeout occurs.