PA_Confirm



PA_Confirm (message; WindowRef) → char

Parameter Type Description
message PA_Unichar* Message to display in the confirmation dialog box
WindowRef Long Link to windows that called the command
Function result char 1 if the user accepts the dialog box.

Description

The routine PA_Confirm displays a confirmation dialog box composed of a note icon, a message, an OK button, and a Cancel Button.

Pass the message to be displayed in message (Pascal or C strings up to 255 characters).

If the user accepts the dialog box, PA_Confirm returns 1. Otherwise it returns 0.

The new parameter is used on Macintosh to link the PA_Confirm to the window that generates the dialog. If you don't care or if the plugin only runs on windows, you can pass 0.

This is just like the CONFIRM command, but you cannot customize the titles of the OK / Cancel buttons. See the 4th Dimension Language Reference manual for more information on this dialog box.

Example

Sample confirm (using ANSI string)

   if(PA_Confirm("Do you _really_ want to quit this wonderful area ?";0))
   {
      myDoSaveTheAreaContent(. . .);
   }

See Also

CONFIRM , PA_Alert .

Error Handling

PA_GetLastError

always returns eER_NoErr