USENET

Macintosh Programmer's Guide

Volume I

Thursday, October 18, 1990

(Last Updated 7-12-95)

Compiled & Formatted by Matthew Xavier Mora


Table of Contents

  1. Copyright Notice
  2. Ordering Information
  3. Introduction
  4. Chapter 1 Miscellaneous Stuff
    1. How to disable text edit from drawing (without flicker)
    2. Algorithm for Random
    3. Data structures for editing text
    4. Data structures for editing text
    5. Data structures for editing text
    6. Better Docs/more proposals/useful sources of info
    7. How do I mail to APDA
    8. Apple deceives us + Useful code snippet [HitTestHook for TextEdit]
    9. Simulating a Menu Bar with Pop-Up Menus (How To Abort out of Popupmenuselect)
    10. The Eternal Question (Using TextEdit with HyperCard)
    11. Good Think C books
    12. Launching with Document List (with Source)
    13. MacTCP problem (and a hack to fix it)
    14. Mouse Handling (setmouse code in C)
    15. Saving data from one launch to another
    16. print variables on screen ?
    17. print variables on screen ?
    18. Adding a document to the launch of an application?
    19. Have you had problems with SetClikLoop?
    20. need Apple-Double format help
    21. Adding a document to the launch of an application? (desktop file notes)
    22. Accessing Nubus board name
    23. For GURU'S Only (Starting Point for serial comm)
    24. Info about KeyCodes
    25. Modifying the mouse input (SetMouse code in pascal)
    26. (Novice) help with Undo function
    27. What is the format of the scrapbook file
    28. Programming the SCC (Code to poll the Macrecorder)
    29. Width of popup menus
    30. Script Manager Date Questions
    31. Changing Radio Button Titles
    32. Leading dashes in menu items.
    33. Str255 --> 'STR ' how?
    34. Where are disk icons kept?
    35. How to tell when an appl quits?
    36. How to get the current application (with code)
    37. Random Number Generator wanted.
  5. Chapter 2 Code Resources
  6. Chapter 3 Communications & Networking
    1. Re: Zones (how does one determine what zone one is in with code)
    2. MacTCP programming with THINK C
    3. Re: Serial driver - Why is CTSHold being set?
    4. The prefered AppleTalk interface, is it from hell or what?
    5. Problem with Apple's distributed MacTCP dnr.c routine (bug has been fixed)
  7. Chapter 4 Compilers & Development Environments
  8. Chapter 5 Dialogs & the Dialog Manager
  9. Chapter 6 File Manager
    1. Re: Finding amount of free disk space?
    2. How to get pathname (with Code)
    3. User items in SFdialog
    4. Re: SFGetFolder (with Code)
    5. Re: Repeat SetVol query
    6. SubjectRe: SFGetFolder
    7. Re: HFS Help
    8. Re: INIT getting it's file name... (with Code)
    9. Re: INIT getting it's file name...(with Code)
    10. Re: opendir() and readdir()(enumerate dir code in pascal)
    11. Re: Please help w/ PBSetCatInfo
    12. Re: FSRead hangs on the serial driver
    13. Re: FSRead hangs on the serial driver
    14. Re: The Prefered Way to Refer to Files...
    15. Re: SFReply.vRefNum -> PathName (pathname from vRefnum and Back in C)
    16. Create a folder code (in Pascal)
    17. How do I get a pathname from a working directory? (full Code)
    18. Re: How to get full pathname?
    19. Re: "SetVol-ing" to a folder in the System Folder...
    20. Re: Data Fork Use
    21. Re: Data Fork Of Currently Running APPL
    22. Re: Data Fork Use
  10. Chapter 7 List Manager & LDEFS
  11. Chapter 8 Memory and the Memory Manager
  12. Chapter 9 Multi-Finder Madness
  13. Chapter 10 Printing & the Print Manager
  14. Chapter 11 QuickDraw & Graphics
  15. Chapter 12 Resources & the Resource Manager
  16. Chapter 13 Sound & the Sound Manager
  17. Chapter 14 Windows & Grafports
  18. Chapter 15 Articles & Notes
    1. Macintosh One-Liners
    2. Scheme to Manage a "Windows" menu
    3. How to write an INIT in Pascal
    4. How do you play Asynchronous Sound?
    5. Default 2.1 CDEF
    6. ToolBox Gotchas
    7. BitMap Rotation in C (and support routines)
    8. INIT Skeleton Code
    9. New Volume Scanning Algorithm
  19. APPENDIX A ASCII Table
  20. APPENDIX B Error Codes
  21. Authors and Credits


Copyright Notice

This COMPLATION of USENET extracts and articles (not the USENET extracts and articles themselves) is copyrighted (c) 1990 by Matthew Xavier Mora. You are free to distribute this volume in anyway you see fit provided that you do not make a profit from doing so. Each individual article is copyrighted by the author who wrote said article. If you use any code that is contained in this volume, please indicate who it came from in your about box or documentation (there is no law saying you have to, but it sure would be nice of you). Any NON Profit or not for profit user groups (such as BMUG and SMUG) are here by granted to include this volume in their software library disks. Any organization who makes a profit by selling public domain and/or shareware software MUST obtain permission from me to distribute this volume.

Exception Clause

Any articles, questions, answers or any other miscellaneous text written by Tim Maroney, are to be considered in the "public domain" and you may use them in any way you see fit. You DO NOT have to give him any credit or any mention in your programs or documentation, for any of the information he unknowingly provided in this guide. He specifically stated that he wants to keep his posting in the public domain so that they will help the most people.


Ordering Information

To get a copy of this volume in printed form send $20.00 to:

MXM Designs
Attn: UMPG Printed Version
39075 Carmel Ct.
Fremont, CA 94538

This volume is also available on a disk in Microsoft Word 4.0 format.

To get a copy of the disk version send $5.00 to:

MXM Designs
Attn: UMPG Disk Version
39075 Carmel Ct.
Fremont, CA 94538

PLEASE MAKE CHECKS PAYABLE TO:

MXM Designs


INTRODUCTION

Welcome to USENET Macintosh Programmers Guide Volume I

This is the first attempt at creating a document for the readers of USENET that deals with Macintosh programming. The first section of this volume is a collection of USENET postings that have appeared in the famous "comp.sys.mac.programmer" newsgroup. This section includes articles on things that you should know when programming the Macintosh, common questions and answers that might help you when you have a problem or general knowledge you should have to prevent you from making a mistake. I started this as a guide for myself because so much information gets posted to the net, its hard to remember it all. Other people seemed interested in the guide so I decided to publish it.

The second part of this guide are articles that people have donated either to me directly when they heard that I was going to publish my guide or articles that have appeared on the net. Hopefully when I get around to making version two of this thing, more people will donate sample code to make this guide more complete. I hope to either include a beginner's section or maybe make it a totally separate volume.

So enjoy, and I hope that this guide helps you as much as it has helped me.

Any questions, comments, or code segements can be sent to me at the addresses listed below. I will include them in the next update.

Matthew Xavier Mora

Internet mxmora@mxmdesigns.com

Applelink mxmora

US Mail 5121 Valpey Park Ave. Fremont, CA 94538

I would like to thank all those people that sent me articles and have donated their free time to answer questions on the net. It is you who are doing a great service to the Mac programming community. I am only the messenger.


Goto Chapter 1 Miscellaneous Stuff