home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!destroyer!ncar!uchinews!ellis!merv
- From: merv@ellis.uchicago.edu (garrett marvin derner)
- Subject: Re: WaitNextEvent availability
- Message-ID: <1992Nov12.180837.11646@midway.uchicago.edu>
- Sender: news@uchinews.uchicago.edu (News System)
- Reply-To: merv@midway.uchicago.edu
- Organization: University of Chicago Computing Organizations
- References: <1dsp39INN9sq@huon.itd.adelaide.edu.au>
- Date: Thu, 12 Nov 1992 18:08:37 GMT
- Lines: 21
-
- In 'Macintosh Programming Secrets' by Knaster & Rollin, it's solved
- this way:
-
- #define WNE_TRAP_NUM 0x60
- #define UNIMPL_TRAP_NUM 0x9F
- . . .
- Boolean gWNEImplemented;
- . . .
- gWNEImplemented = (NGetTrapAddress(WNE_TRAP_NUM, ToolTrap) !=
- NGetTrapAddress(UNIMPL_TRAP_NUM, ToolTrap));
- . . .
- if( gWNEImplemented)
- WaitNextEvent(everyEvent, &theEvent, MIN_SLEEP, NIL_MOUSE_REGION);
- else {
- SystemTask();
- GetNextEvent( everyEvent, &theEvent);
- }
-
- ----------------
- (signed) Garrett
- &Garrett == merv@ellis.uchicago.edu
-