Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Mouse interface routines - <b>alert()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ALERT()
 Mouse Aware replacement of ALERT()
------------------------------------------------------------------------------
 Syntax
      ALERT( <cMessage> [, <aOptions] [, <cColorString>] [, <nStartRow>])
          --> <nChoice>
 Arguments
     <cMessage> defines a message shown centered in the alert box.
     If the message contains one or more semicolons, the text after the
     semicolons is centered on succeeding lines in the dialog box.

     <aOptions> defines a list of possible responses to the dialog
     box.

     <cColorString> which is a color string defining the colors of the alert
     box. The standard color is used for the box and the background. The
     selected color is used for the options. This option is available within
     the standard Clipper ALERT function but is undocumented. It defaults to
     "W+/R+, W+/B+","W+/N, N/W+" for color and monochrome screens.

     <nStartRow> which is an option which specifies the starting row of the
     alert box. This option is normally disabled by compiler directive but
     can be turned on for more flexibility in the use of ALERT. If NIL then
     normal behavior of centering occurs.

 Returns
     ALERT() returns a numeric value indicating which option was
     chosen.  If the Esc key is pressed, the value returned is zero.
 Description
     The ALERT() function creates a simple modal dialog.  It is useful in
     error handlers and other "pause" functions.  The user can respond
     chosen by moving a highlight bar and pressing the Return or Space
     keys, or by pressing the key corresponding to the first letter of
     the option.  If <aOptions> is not supplied, a single "Ok" option is
     presented.

     NOTE: If you use RTLINK with PLLs then you must rebuild your PLL to
     exclude ALERT. You do this by just adding the line "exclude ALERT" to
     BASE50.LNK and running RTLINK. (Turn off the PLL switch if it is in
     your RTLINKCMD environment variable.) Ignore any doubly defined symbol
     warning message. They cause no harm.

 Examples
     nResult=ALERT("Floppy Not Ready",{"Abort","Retry"})

 Source: ALERT.PRG

 Author: Leo Letendre

See Also: MInkey()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson