Jan 93 Tips
Volume Number: 9
Issue Number: 1
Column Tag: Tips & Tidbits
Tips & Tidbits
By Neil Ticktin, Editor-in-Chief
This column is your opportunity to spread the word about little bits of
information that you find out about. These tidbits can be programming related or they
can be user tips that are particularly useful to programmers.
MacTutor will pay $25 for every tip used, and $50 for the Tip of the Month. You
can also take your award in orders or subscriptions.
To submit a tip, send in a letter to the magazine. AppleLink is our preferred
method, but feel free to send something via any e-mail address or US Mail. If you do
send snail mail, enclose a printed copy and a disk copy of the letter so that it does not
have to be retyped.
Let us know what you think. Remember, this is your magazine. Try ‘em out and
let us know...
Tip of the month
Have you ever wanted to invoke debugger from your C code, but only under
certain circumstances? This tip is a great way to invoke the debugger
programmatically. In THINK C, define the following macro:
#define oDebugger() do { asm { BTST#2,Keymap+7 } asm { BEQ@NoDebug }
asm { _Debugger } asm {@NoDebug } }while (0)
Then, any calls to
oDebugger();
in your source code will fall into the debugger only if the option key is held down.
Obviously, be sure to take this out before the final version. I do a #ifdef
conditional around the macro just to be sure it doesn't compile into any of my final
versions. I have tried this only with THINK C 5.0, so (as they say) your mileage may
vary.
- Kent Miller
Arlington, Texas
Faster access to the MacTutor CD-ROM Index
CD-ROMs are great for distributing large amounts of data, but they are not the
fastest things known to man. The All of MacTutor CDs use On Location™ from On
Technology to index the contents of the CD. Although On Location is comparitively very
fast, you can increase it’s speed dramatically by copying the index to your hard disk
and accessing it from there. This methodolgy could speed up your index access by as
much as 15 times.
- Neil Ticktin
Editor-in-Chief
Auto Hides in System 7
If you use the “Hide” feature in System 7 application switching, there is an
automatic way. Hold down the option key while switching applications, System 7 will
automatically hide the application you are switching from.
This works whether you use the application menu or by just clicking on another
application’s window.
- Neil Ticktin
Editor-in-Chief