home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!wupost!cs.utexas.edu!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!csuley
- From: csuley@cs.cornell.edu (Christopher Suley)
- Subject: Word 5.0a silliness
- Message-ID: <1992Nov20.001343.3723@cs.cornell.edu>
- Organization: Cornell Univ. CS Dept, Ithaca NY 14853
- Date: Fri, 20 Nov 1992 00:13:43 GMT
- Lines: 30
-
- If you have a copy of Microsoft Word 5.0a and a debugger handy, you
- might find this amusing.
-
- * Start up Microsoft Word.
- * Begin typing. Don't click the mouse anywhere.
- * Enter the debugger and set a trap on Word's calls to WaitNextEvent.
- ("atba waitnextevent" in MacsBug)
- * Resume execution.
- * Don't type anything. Don't click the mouse.
- * Enjoy the fact that the debugger is never entered.
- * Now, hit a key. You will fall into MacsBug at a call to WaitNextEvent.
- * Resume execution. The character appears on the screen, and once again,
- the debugger is never entered.
- * Click the mouse. You should now start repeatedly getting breaks at
- WaitNextEvent.
-
- Once you start typing, Word never calls WaitNextEvent until you hit a key!
- If you click the mouse, it resumes calling WaitNextEvent regularly like a
- normal, well-behaved application, but as soon as you type, it will stop
- calling it and only call it when you hit a key.
-
- If you have a copy of my little shareware trifle Zipple (available at
- sumex and mac.archive - it puts an animated image over your Apple menu title)
- you will notice an interesting side effect of this odd coding practice.
- Zipple will freeze up. This is because it is written as a driver that
- gets time periodically. The way the system gives drivers time is by calling
- WaitNextEvent. Word doesn't call WaitNextEvent. My driver doesn't get
- time, so it doesn't run. I imagine other drivers that need time don't get
- called either. Yuck.
-
-