home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!waikato.ac.nz!ldo
- From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: FlushEvents necessary?
- Message-ID: <1992Aug17.183233.10148@waikato.ac.nz>
- Date: 17 Aug 92 18:32:33 +1200
- References: <1992Aug11.152914.18785@uni-paderborn.de> <13992@gazette.bcm.tmc.edu> <hammett.714004576@sbsu1.aukuni.ac.nz>
- Organization: University of Waikato, Hamilton, New Zealand
- Lines: 34
-
- In article <hammett.714004576@sbsu1.aukuni.ac.nz>, hammett@sbsu1.aukuni.ac.nz (Tim Hammett) writes:
- > ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
- >>> InitWindows();
- >>> FlushEvents(0xffff,0);
- >
- >>Personally I prefer to do a FlushEvents *after* all my program setup.
- >
- > Is it necessary to do FlushEvents() at all these days? I notice that most
- > of the DTS sample Apps don't. I would be interested in hearing the pros
- > and cons of using FlushEvents at program startup.
-
- The reason for calling FlushEvents isn't technical, it's to do with the
- user interface. While the program is starting up, the user might have clicked
- the mouse, or pressed a few keys. It makes sense to flush all these before
- actually entering your event loop for the first time, to avoid any unexpected
- behaviour.
-
- Actually there's no reason why program startup should be special; it also
- makes sense to call FlushEvents after doing *any* potentially lengthy operation,
- during which you aren't able to give user feedback. For example, a screen
- update in ditherCopy mode. Or a file access to a VAXshare server.
-
- Thot: in the old floppy-based days, programs took quite a long while to
- start up. These days it's not so bad, though programs like PageMaker,
- FreeHand, Premiere, Canvas and others seem to hint at a trend back to the
- slow old days...
-
- Lawrence D'Oliveiro fone: +64-7-856-2889
- Computer Services Dept fax: +64-7-838-4066
- University of Waikato electric mail: ldo@waikato.ac.nz
- Hamilton, New Zealand 37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00
- PC operating environments: DOS is the leading software operating environment
- (73%), followed by Microsoft Corp.'s Windows (18%), Unix (8%) and the Macintosh
- environment (3%). -- Computerworld August 3 report on USSR.
-