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


NoteAlert

To display an alert box with a note 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 NoteAlert function.

FUNCTION NoteAlert (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 NoteAlert function is the same as the Alert function except that, before drawing the items in the alert box, NoteAlert draws the note icon in the upper-left corner (within the rectangle with local coordinates [10,20,42,52]). The note icon has the following resource ID:

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

Use a note alert to inform users of a minor mistake that won't have any disastrous consequences if left as is. Usually this type of alert simply offers information, and the user responds by clicking an OK button. Occasionally, a note alert may ask a simple question and provide a choice of responses.

SEE ALSO
Figure 6-3 on page 6-8 illustrates the note icon in a typical note alert. Except that it includes a note icon in the alert box, NoteAlert 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