Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Macintosh Toolbox Essentials /
Chapter 6 - Dialog Manager / Dialog Manager Reference
Dialog Manager Routines / Creating Alerts


StopAlert

To display an alert box with a stop icon in its upper-left corner (or, if appropriate for the alert stage, to play an alert sound instead of or in addition to displaying the alert box), use the StopAlert function.

FUNCTION StopAlert (alertID: Integer; 
                    filterProc: ModalFilterProcPtr): Integer;
alertID
The resource ID of an alert resource. If the alert resource is missing, the Dialog Manager returns to your application without creating the requested alert.
filterProc
A pointer to a function that responds to events not handled by the ModalDialog procedure. If you set this parameter to NIL, the
Dialog Manager uses the standard event filter function, which allows users to press the Return or Enter key in lieu of clicking the default button. However, your application should provide a simple event filter function that also allows background applications to receive update events. Pass a pointer to the event filter function in this parameter.
DESCRIPTION
The StopAlert function is the same as the Alert function except that, before drawing the items in the alert box, StopAlert draws the stop icon in the upper-left corner (within the rectangle with local coordinates [10,20,42,52]). The stop icon has the following resource ID:

CONST stopIcon = 0;  {stop icon}
By default, the Dialog Manager uses the standard stop icon from the System file. You can change this icon by providing your own 'ICON' resource with this resource ID number.

Use a stop alert to inform the user that a problem or situation is so serious that the action cannot be completed. Stop alerts typically have only a single button (OK), because all the user can do is acknowledge that the action cannot be completed.

SEE ALSO
Figure 6-5 on page 6-9 illustrates the stop icon in a typical stop alert. Except that it includes a stop icon in the alert box, StopAlert is identical to the Alert function. See the description of the Alert function on page 6-99 for detailed information about the parameters and behavior of both of these functions.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996