home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!comp.vuw.ac.nz!waikato.ac.nz!ldo
- From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Toolbox init (was Re: What is a memory error -113 ?)
- Message-ID: <1992Aug13.181036.10085@waikato.ac.nz>
- Date: 13 Aug 92 18:10:36 +1200
- References: <1992Aug11.152914.18785@uni-paderborn.de> <13992@gazette.bcm.tmc.edu> <1992Aug13.031241.9631@gallant.apple.com>
- Organization: University of Waikato, Hamilton, New Zealand
- Lines: 42
-
- In article <1992Aug13.031241.9631@gallant.apple.com>, dodd@apple.com (Mike Dodd) writes:
- >
- > void initToolbox(void)
- > {
- > MaxApplZone();
- > InitGraf(&qd.thePort);
- > InitFonts();
-
- Technically speaking, you're supposed to call InitFonts *before* InitGraf.
- Not that I've ever experienced any problems from doing it the other way
- round...
-
- > InitWindows();
- > FlushEvents(0xffff,0);
-
- Personally I prefer to do a FlushEvents *after* all my program setup.
- By the way, did you know that FlushEvents does a logical-and of the
- mask you pass it with the low-memory global FlEvtMask? And that the
- usual value for FlEvtMask is all 1's except for the diskEvt bit?
- I don't recall seeing this documented anywhere. Initially I used to
- worry about excluding the diskEvt bit from the FlushEvents mask myself,
- because I always felt that disk-insertion events were something that
- you would almost *never* want to flush.
-
- > InitMenus();
- > TEInit();
- > InitDialogs(0);
- > InitCursor();
- > }
-
- On a related note, I've wondered whether the Mac could do with something
- like a special key combination so the user can cancel all pending mouse
- clicks and keystrokes--effectively be able to invoke FlushEvents at any time.
- Sometimes you may type ahead or "mouse ahead"--and then you may want to
- change your mind...
-
- 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
- "You don't need floppies in an open client/server environment."
- -- quote in a recent Computerworld
-