PA_Request


version 2003


PA_Request (message; value; okButton; cancelButton) → char

Parameter Type Description
message PA_Unichar* Message to display in the request dialog box
value PA_Unichar* Default data for the enterable text area
Value entered by user
okButton PA_Unichar* OK button title
cancelButton PA_Unichar* Cancel button title
Function result char 1 if the user validated the dialog

Description

The routine PA_Request displays a request dialog box composed of a message, a text input area, an OK button, and a Cancel Button.

This is like the Request function. See the 4D Language Reference manual for more information on the routine.

The differences between the 4D command and the routine are:

• value holds both the default data entry and the string entered by the user
• The routine returns 1 if the user clicks clicks you do not have to test the OK variable.

NOTE

Each parameter is either Pascal or C strings, up to 255 characters.

Use Pascal or C strings depending on the previous call to PA_UseCString , PA_UsePString .

Example

Requesting the user name:

   char   response{256];
   response[0] = (char) 0;
   if(PA_Request("enter your name : ", response, "OK", "Do not want to"))
   {
      /* . . . */
   }

See Also

PA_Alert , PA_Confirm , Request .

Error Handling

PA_GetLastError

always returns eER_NoErr