Name
moai.Request -- show a system requester
Synopsis
r = moai.Request(title$, body$, buts$[, icon$])
Function
This function pops up a standard system requester that displays a message (body$) and also allows the user to make a selection using one of the buttons specified by buts$. Optionally, you can also specify an icon that should be displayed in the requester. If you specify an empty string in title$, it will automatically use the title specified in @APPTITLE.

Separate the buttons specified in buts$ by a "|". The return value tells you which button the user pressed. Please note that the rightmost button always has the value of False (0) because it is typically used as the "Cancel" button. If you have for example three button choices "One|Two|Three", the button "Three" has return value 0, "Two" returns 2, and "One" returns 1.

The optional argument icon$ can be set to one of the following predefined values:

"None":
no icon

"Information":
an information sign

"Error":
an error sign

"Warning":
a warning sign

"Question":
a question mark

Inputs
title$
title for the requester; pass an empty string ("") to use the default title
body$
text to appear in the body of the requester
buts$
one or more buttons that the user can press
icon$
optional: icon to show in the requester (defaults to "Information")
Results
r
the button that was pressed by the user
Example
moai.Request("RapaGUI", "Hello!\n\n" ..
    "Do you like RapaGUI!", "Yes|No")
The code above demonstrates the use of the moai.Request() function.

Show TOC