Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!stat!vsserv!loligo!pepke
From: pepke@loligo (Eric Pepke)
Newsgroups: comp.sys.mac
Subject: Re: Macintosh One-Liners
Message-ID: <239@vsserv.scri.fsu.edu>
Date: 3 Oct 89 17:00:07 GMT
References: <221@vsserv.scri.fsu.edu> <4466@internal.Apple.COM> <15876@dartvax.Dartmouth.EDU> <13904@well.UUCP>
Sender: news@vsserv.scri.fsu.edu
Reply-To: pepke@loligo.UUCP (Eric Pepke)
Distribution: na
Organization: Supercomputer Computations Research Institute
Lines: 63

Here is the next iteration of the one-liner list:

Users' one-liners:
A beep on trying to open a desk accessory may mean the DA Handler is missing.
A beep on trying to open a desk accessory may mean there is not enough memory.
If opening a document from Finder doesn't work, open it within the application.
A flashing Apple menu means the alarm clock is ringing.
A U-shaped icon at the right of the menu bar means Easy Access is activated.
HyperCard visual effects won't work if the monitor is set to more than 2 colors
Hold down the F key and click OK in the print dialog to make a PostScript file.
Hold down the K key instead to make a PostScript file which contains LaserPrep.
Turn background printing off before trying to make a PostScript file.
Remove the paper tray during LaserWriter power-up to avoid the startup page.
Hold down the mouse while powering on to eject any disk in the computer.
Don't put disks on the left side of a small Macintosh or near loudspeakers.
It is safer to rebuild the desktop under Finder than under Multifinder.
Finder's default memory size is a bare minimum.  Increase it with Get Info.

Programmers' one-liners:
The maximum number of windows in Finder is stored in LAYO resource 128.
Don't use SetEventMask to disable mouseUp events.
SetPort to a known good grafPort once every time through the event loop.
Calling WaitNextEvent with more than 60 ticks will fail on some systems.
Use SetItem to include meta characters literally in menus.
GetResource doesn't return resNotFound.  Check for a NIL handle instead.
Move and size windows to the bounding box of GetGrayRgn.
Hide scroll bars when deactivating a window.
Call DrawGrowIcon when activating or deactivating a window with a grow region.
DrawGrowIcon does not check to see if the window has a grow region.
itemHit will not be set when a dialog filter is called.
Use a disabled UserItem to draw the roundrect outline around the OK button.
Call IsDialogEvents and DialogSelect even if GetNextEvent returns false.
ModalDialog assumes the dialog is already visible and in the front.
Always set the VisRgn and ClipRgn of offscreen ports.
Set the ClipRgn first when making a picture.
Don't make rowBytes in bitMaps greater than 8191.
Don't write in the application file.  This will fail with read-only devices.  
Save application preferences in a folder named Preferences in the System Folder
Truncate and reallocate files before overwriting to reduce fragmentation.
Check/change the creator and type of Save As... files before overwriting.
If you rewrite files by deleting and creating, copy all Finder information.
Delete uses the Poor Man's Search Path, so don't delete blindly.
Directory IDs are longs, not shorts.  Shorts work ALMOST all the time.
Call GetDblTime to get the maximum time for a double click.
Measure double click time from mouse up to mouse down.
Use SysEnvirons to find the System (Blessed) Folder.
Use GetAppParms to get the name of the application.
The high bit of SysParam . volClik enables the alarm clock.
Check the application name at $910 before exiting with ES within MacsBug.
To exit to shell in the mini-debugger, enter SM 0 A9 F4 and then G 0.
Use HT in MacsBug to estimate how many times to call MoreMasters.
Put an odd long at location zero on a 68000 to help find NIL references.

Thanks to Keith Rollin, Gregory Dudek, Brian Bechtel, Henry Minsky, 
Carl C. Hewitt, and Jim Lyons.

Eric Pepke                                     INTERNET: pepke@gw.scri.fsu.edu
Supercomputer Computations Research Institute  MFENET:   pepke@fsu
Florida State University                       SPAN:     scri::pepke
Tallahassee, FL 32306-4052                     BITNET:   pepke@fsu

Disclaimer: My employers seldom even LISTEN to my opinions.
Meta-disclaimer: Any society that needs disclaimers has too many lawyers.