This section includes the three Mojo dialog APIs:
Error dialog
Alert dialog
Custom dialog
Each entry includes a brief description, repeating some of the information from Chapter 4, followed by an enumeration of the arguments. Dialogs are accessed through a direct API so the format for this entry will be structured as an API entry.
This API is used to post error messages in a modal dialog box with a fixed title of “Error,” a customizable message, and a confirmation button. The Error dialog must be used only with errors, since you can’t change the title.
You can display a short message using an Alert dialog, with one or more HTML buttons presenting the selection options. This is the best option if you have either a nonerror message for the user or want to present options in the form of button selections.
The showDialog
function can
display any type of content to the user in the form of a modal dialog
box. You can put anything into a dialog box that you’d put into a scene,
meaning almost any web content or Mojo UI content.
18.116.36.56