Jul 94 Tips
Volume Number: | | 10
|
Issue Number: | | 7
|
Column Tag: | | Tips & Tidbits
|
Tips & Tidbits
By Scott T Boyd, Editor
Note: Source code files accompanying article are located on MacTech CD-ROM or source code disks.
Got a hot developer tip youve been keeping to yourself but really need to share? Think you have a better trick up your sleeve? Send us your tips and tricks, especially programming-related tips, but dont hold back if youve got programmers user tips.
MacTech Magazine will pay $25 for every tip used, and $50 for the Tip of the Month. You can take your award in orders or subscriptions if you prefer.
To submit a tip, send it in by e-mail. (Please make sure your code compiles). See page two for our addresses.
Tip/hack of the month
Startup Items: Nice Guys Finish Last
You can put any kind of programs, folders, or aliases in the Startup Items folder in your System folder, and they will open automatically when you startup your Mac. Some people put an alias of their most commonly used folder into their Startup Items, so it will open and become the frontmost window in Finder.
Startup items open in alphabetical order, and the last item opened will be the one that stays in the foreground once the startup is complete. Unfortunately, the last one opened may not be the one you want up front. Heres how you can force a particular Startup Item to open last.
Make an alias of the item you want opened last, and rename it to Option-z, the Omega character . It sorts alphabetically after most other characters and seems very appropriate.
Drop the alias into the Startup Items folder; it will open last. If its has already been opened and switched into background, this last startup item will force it to the foreground.
My startup item is an alias of the hard drive itself, which opens the root directory of the drive and pulls the Finder into the foreground. Thats the way I like it, but if youd rather just have the Finder in front without any particular folder or window open, heres a hack thatll do it:
1) Create an empty folder in the root directory of your startup drive, and name it Desktop_Folder (note the underscore in the name).
2) Create an alias to that folder, and rename it (omega is option-z).
3) Throw away the empty Desktop_Folder folder and empty the trash.
4) Launch ResEdit and select Open from the File menu. Check the box for Use alias instead of original file and open the alias.
5) Open the alis resource and find each instance of the string Desktop_Folder; it appears in 2 places. Change the underscore in each to a space, so it reads Desktop Folder instead.
6) Save your changes and quit from ResEdit.
7) Put the alias into your Startup Items folder and reboot.
When Finder opens the alias, Finder will come to the foreground and stay there; no folder will open because the Desktop folder is already displayed.
- Lee David Rimar, Absoft Corporation
Fat Gold
I found a neat way to build fat applications with CodeWarrior Gold:
1. Create a 68K project & resource file.
2. Build the 68K project & set the application name to something like app.PPC.proj.rsrc so it will appear as a resource file to the PPC project (the type & creator can still be what youd have for an application).
3. When you build the PPC project, the 68K application will be included as the project resource file.
Youll now have a fat application and you can also use the 68K-only resource file as the 68K version or for debugging if you're running on a non-PowerMac.
- Mike Cohen, ISIS International