ADC Home > Reference Library > Technical Notes > Legacy Documents > Carbon >
Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.
Current information on this Reference Library topic can be found here:
Technical Note TB28
Problem with WaitNextEvent in MultiFinder 1.0
This Technical Note discusses a bug in
WaitNextEvent in MultiFinder
1.0. This bug only occurs when
WaitNextEvent is called from the
background. This bug will be fixed in the next release of MultiFinder.
[Nov 01 1987]
FUNCTION WaitNextEvent(mask: INTEGER; VAR event: EventRecord;
sleep: LONGINT; mouseRgn: RgnHandle): BOOLEAN;
pascal Boolean WaitNextEvent(mask,event,sleep,mouseRgn)
unsigned short mask;
unsigned long sleep;
should not call
WaitNextEvent from the background with a value
sleep that is greater than
50. This value has been
determined empirically for a Macintosh II; larger values can be used on the
Macintosh Plus and the Macintosh SE. If an application uses a large value of
sleep when running in the background, MultiFinder 1.0 will hang under
the following circumstances:
- The application that is calling
WaitNextEvent with a large
sleep value has been put in the background.
- That application becomes the foreground application when another application (including the desk accessory handler) quits.
If you use a value of
sleep that is small enough, this problem will
not occur. If you use an algorithm to calculate
sleep, make sure that
the maximum is clipped to
This problem will be fixed in the next release of MultiFinder. You can call
SysEnvirons to test for the system version number. This bug will not
happen when the System version is greater than
Back to top
Back to top
Acrobat version of this Note (48K).