|
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]
|
Introduction
FUNCTION WaitNextEvent(mask: INTEGER; VAR event: EventRecord;
sleep: LONGINT; mouseRgn: RgnHandle): BOOLEAN;
pascal Boolean WaitNextEvent(mask,event,sleep,mouseRgn)
unsigned short mask;
EventRecord *event;
unsigned long sleep;
RgnHandle mouseRgn;
|
should not call WaitNextEvent from the background with a value
of 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 50 .
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 $04FF .
Back to top References
M.TB.Multifinder
M.TB.MultifinderMisc.
Back to top
Downloadables
|
Acrobat version of this Note (48K).
|
Download
|
|