TweetFollow Us on Twitter

Aug 85 Letters
Volume Number:1
Issue Number:9
Column Tag:Letters, Reviews

Letters, reviews

Dr. Tom's Reference Decks

Tom Programs of Washington DC has announced a set of reference cards keyed to Inside Macintosh for developers and programmers. Each card lists information about a single toolbox trap call, giving the trap name, address, parameters and notes on how to make use of the trap routine. Both the toolbox and OS are covered. Three sample cards are shown below full size. As you can see, there is quite a bit of technical information summarized for each routine. This set is a must for anyone doing programming in assembly or C where toolbox calls must be made directly. It provides a handy quick reference during programming that can eliminate the need to flip through the un-referenced Inside Macintosh book.

Three decks are being offered, printed on card stock and color coded by manager. Each of the three sets sell for $21.95, a very reasonable price. Alternately, you can buy the entire set as a Microsoft File data base for $59.95, but we think the index card format is much more handy, since your computer is hardly free to run File while your writing code! Contact Tom Programs, Suite 34T, 1500 Massachusetts Ave., NW in Washington, DC. 20005. Or call (223-6813). Or bag the formalities and just send for the goods: Deck 1, 2 or 3 @ $21.95 each, File Data Base @ $59.95 or both combined for $99.95. Include $3 for shipping.

One Flew Over The QuickDraw's Nest

Valuable Information Press announces a new technical Macintosh Programming book by Gregg Lewis of Montreal, Canada, titled "One Flew Over the QuickDraw's Nest" (a fan of Jack Nicholson's no doubt!) This book is designed for people who want to program their Macintosh! (Where have I heard that before?) Should be great stuff for MacTutor fans. The book sells for $24.95 and is being distributed by Jim Fitzsimmons at Mac America, the same distributor who handles MacTutor, Macazine and the Macintosh Buyer's Guide. Contact Jim directly to reserve an advance copy. The final manuscript is being prepared for printing now and is expected to be available from Jim at the Mac Expo in Boston at the MacTutor booth. Contact Mac America, (714) 779-2922.

Here is a sample chapter from the book, re-printed with Gregg Lewis's permission [Since Gregg speaks French, some english grammer is still being revised prior to final printing]:

REVIEW

At this stage, you and I are perfectly aware that we still have a long way to go before we can set up a program together. We have brought up a certain amount of notions, and we'll be obliged to extend some of the points raised.The first approach was very schematic, of course. Now that a collection of concepts has been provided, which is supposed to have fixed all the spare parts in our minds, let's penetrate more in depth each component. Don't expect to really understand the meaning of everything until we go together through the commented program lines.

HOWS AND WHYS OF THE MANAGERS

In order to have modular programming, the people at Apple wrote a set of procedures and functions for each specialised operation within the Macintosh™. They constantly used the same variable and type definitions; that is the same words. They designed them such a way that, in a given structure, they always found the required types and the amount of definitions they needed. So, they designed several basic structures. Some examples are the types Point, Rect, cursor or bitmap, which we saw in QuickDraw.

Adding some basic functions, they wrote a whole nucleus to perform specialised low-level tasks. This nucleus has been named... Managers. And each specific task oriented Manager is named for its purpose. The Manager philosophy allows modular programming, which brings compactness in coding, but it is not the only reason why. As an external programmer, you've been using those procedures and definitions for a week, you eat with them, you sleep with them, you drink in their company, you... for the rest of your life. They're in your mind forever, and ever. In short, you know them, you know what they do, you relate a name to a function, and with the mnemonic names used, you do not loose time in associating a name with the meaning of a type, a procedure, or a function and the purpose of it. Does the routine 'GetNextEvent' belong to the Font Manager? Certainly not.

These mnemonics can tell immediately which Manager the function or procedure you are reading - or writing - belongs to. And, as said previously, within one week, they are part of yourself. There are more than 480 different routines, but actually, only some 80 are currently used. Obviously, this is a small number, and just like the individuals you happen to meet daily, you know them after a short while.

HOWS AND WHYS OF AN EVENTS LOOP

The whole interaction between the application, the user and the system goes via exploring an events queue. You are not obliged to process the events in the sequence they occured. You may select one or several of them using a selection mask, each type of event has its numeric code, corresponding to a bit of the mask.

In order to accept several types of events, it is enough to add their numeric codes and to pass the result through the EventMask. A mask of (-1) will pass all events which may occur. These points will be developed while exploring the Event Manager.

Time is an important notion: the unit of time chosen is the tick, a 1/60th of a second, date synchronized interval. The number of ticks (Tickcount, a longint) is maintained from the beginning of last boot-up.

Why this choice? Because the Macintosh™ system is re-initialized every 1/60th of a second (during the Vertical Retrace Interrupt), and then, the memory itself is re-organized.

An event is described in a record (EventRecord). It contains such items as: Which Event, When (in ticks), and where the mouse is (in global grid coordinates, not in a GrafPort). All of this information is qualitative as well as quantitative data in regard to an Event.

Different types of tasks are met: background (keyboard, mouse, SystemTask), foreground, etc.; some events are even swallowed and processed by the system, and require no action from the developer.

With such a system, generating events at random, you don't know when an event occurs, you cannot foresee its arrival and reserve it any room in the next Hilton. The events occur when a software user decides he will click, or inserts a diskette; the exact instant may not be forecast. In consequence, your software will have to constantly test if an event, any kind of event, has occured.

The best way to write compact programs that test events, is to use an EVENTS LOOP. This method reduces a lot the code size (both source and object). A survey on automations and compilers shows that one is better off using tabular automations to perform the error recovery without extra prohibitive sized code (random events). This point will get clear while explaining GetNextEvent.

An automation has transition events and states. In the Macintosh™ programing, events produced by the System are transition events; and, states are handled by the application, via booleans, etc.

This small chapter summarizes the stuff so far covered. Now that you know about the machine (well, reasonably), we dive into the Managers, themselves, in person.

We begin by, uh? Which Manager already?

Oh, yes...

The Memory Manager.

Letters

Write for Women Too!

Regina S. Litman

Silver Spring, MD

My Mac is downloading from a BBS right now, so I have to (horrors!) handwrite this letter. There aren't enough women involved in Mac developing. Hope I can shed my IBM/Univac mainframe biases toward Cobol and PL/1 and start picking up Pascal, Forth, C, NEON, LISP, Modula-2, Assembly and BASIC so that I can write for the Mac soon.

In the meantime, here are some tips at using more inclusive language, so that your (hopefully growing numbers of) female readers won't feel left out.

Instead of "The user literally changes...to his own tastes..", you can say "Users literally change...to their own tastes..." or something similar. Get the idea? I don't mind "his" or "her", but I know that others do though.

I look forward to learning from past, present, and especially future MacTutor issues. Also, please do not let others have my name, address and phone number for commercial purposes.

[Can I sign your name to this letter? Shall try to watch the gender in our articles. Thank you. -Ed.]

Sold on Call A.P.P.L.E. Tradition

Arthur B. Davis, Jr.

Sterling, VA

OK guys, I'm sold. I just found your publication for the first time at issue #7 and I am quite pleased to see what you are doing. I am a software engineer for a living, but I am relatively new to the Macintosh, and I am thrilled to see the tradition (as you say) of Dr. Dobbs and Call A.P.P.L.E. still alive and attached to this marvelous machine. I found issue #7 to be very much "to the point" and informative. I not only hope that you continue, but that you performed at the same level in the past, as I am writing not merely to compliment you and subscribe, but also to order the first six issues.

Your assembler articles might be of great interest to me if I knew where to start. Any suggestions would be gratefully accepted. [If your into MacAsm, check out this month's Beginner's Corner for a simple MacAsm assembly shell. If you like MDS, see issues #3 and #4 for similar Apple assembly programs for windows, menu bars and event loops.-Ed.]

Forth Tokens

Larry Tannenbaum

Long Beach, CA

I was at a computer store the other day and I picked up a copy of your magzine and started looking through it. You've got some good stuff in there and I'd like to subscribe. I have some comments on the FORTH column in the May issue. The author should mention which version of MacForth he's talking about. I have versions 1.1, 1.2, 2.0 and 2.1. The tokens mentioned in the column work in 2.0 but apparently are not available in 1.2 or 2.1. Anyway I couldn't find the same code in memory. The dictionary in the later versions are in a different order so the tokens won't be the same.

[ Jörg, can you provide an update on this? -Ed.]

Mac Technical Notes?

Dave Alverson

Cincinnati, OH

I hope you are planning to reprint the Macintosh Technical notes from Apple in MacTutor. I don't think they would mind. I think the first issue is just now going out. [Haven't heard of this or recieved anything and I'm certified. Anybody know about this? -Ed.]

MacPascal Frustrations

Steven Leach

Menlo Park, CA

I would like to relate my classmates and my experience in using MacPascal version 1.0 to write graphics oriented software for a class at Stanford University. First the good part: the debugging facilities in this system are very good. The use of the observe window, to allow a person to see how the variables are changing while the program is executing is extremely helpful to find the occasions when a sign or operation had been switched. The Instant Window that allows a person to enter small Pascal legal statements in conjunction with the STOPS is also useful, but is often difficult to use for debugging since only those variables that are currently active when the program was stopped can be used. The editor is quite good, although if your program gets over 10K, it does tend to get a little slow, especially on boot up.

Now for the bad news: Besides the established procedures available in MacPascal, in order to get at the tool box, you must study very carefully the text editor example given on the MacPascal disk, in order to create your own Menus, dialog boxes, buttons, etc. through a completely unmentioned facility called InLine Procedure. Since this procedure has only been very briefly discussed in MacTutor, I have yet to have menus in my programs that have not bombed the system. This is bad enough, since it requires that I buy Inside Macintosh (which I have now done), however it gets worse. If your Pascal program exceeds 30K!!! the text editor, program editor hangs completely, no warning, no sign, not even a bomb; it just stops and you have to restart the system and lose all you have typed in since you last saved the file you were working on! Several of us called Think Technologies to ask about this and were given no explanation. Thank you for your magazine, and for providing a forum for this and other issues important to programming.

[Alan Wootton, can you look into this for us? Personally, I like MS Basic 2.0 for large programs that have to be done quick. I've had no problems using custom menus and such from BASIC. Both InLine and GENERIC procedures allow full toolbox access for Pascal and have been covered in past issues of MacTutor. Perhaps we can address a more fuller treatment of menus under MacPascal in an up coming issue. -Ed.]

Forth Conference

Linda Kahn

San Jose, CA.

The FORTH interest group is sponsoring a Forth Modification Laboratory conference October 25-27, 1985 at the Stettenfels Castle near Frankfurt, Germany. This FORML is a forum for sharing and discussing new proposals to enhance the Forth computer language.

FIG also invites you to the 7th annual Forth convention and banquet on September 21-22, 1985 in Palo Alto, CA at the Hyatt Rickeys. The convention will focus on current developments and uses of the Forth language with exhibits, vendors, tutorials and more. Convention pre-registration is $10. For additional information, write FIG, P.O. Box 8231, San Jose, CA. 95155 or call (408) 277-0668.

MacTutor Ads are OK

Robert Shatto

Saugus, CA

I am very impressed with the quality and quantity of your articles and I want you to know that such work is being noticed and supported. I have already ordered material from your advertisements that I coudn't find anywhere else, so keep up the good work and keep out the bad ads!

Bob's the Greatest!

David W. Smith

Milpitas, CA

Bob Denny's article on custom dialog boxes in volume 1-7 was outstanding! However, potential users of Bob's routine should take care that the string returned by the dialog is really null-terminated.

I found the Mousehole postings quite interesting and I have heard from MAUG and local Mac boards that this is a great board. Any chance that I might get some info on how to apply for "Usership"? [Write the Mousehole care of the address at the top of the Mousehole colmun in this issue for a password and access instructions.-Ed.]

Do Nothing Program!

Michael Coren

Dresher, PA

This letter is being written in response to Andy Gottlieb's letter that appeared in the June 1985 issue of MacTutor. He wants to know if there is an application available "...which does absolutely nothing but return to the Finder". Well, Mr. Gottlieb, there is, and you already have it. It's called the Finder! To use it, open up the system folder, hold down the command and option keys, double-click on the Finder and release the keys. This will "run" the Finder on that disk, making that the startup disk.

Phenomenal!

Scott Vanderbilt

El Segundo, CA

You folks have a phenomenal magazine. Sign me up pronto, tonto! Enclosed is my check for $24.

NEON WANTED

Randy McCallum

Trail, BC, Canada

First of all, thank you for issuing this Mac tutorial Journal. I want to learn how to make my own programs on the Mac and have just recently purchased NEON and MacForth. I was getting discouraged at first, but Reese Warner from Kriya Systems told me of your monthly Journal. I am told that at NEON tutorial will be in the upcoming issues, of which I am glad to hear. [We had our first NEON column by Noel Bergman last month; we haven't heard from Noel in a while, so Paul Snively is working up another one. Between those two editors, we hope to have a regular NEON column. -Ed.]

I have a BBS for Mac users in my area [ (604)-368-5931] called "Neon Lights" BBS, running on a mouse exchange program from Dreams of Phoniex. I want to be able to make my own BBS program using NEON or Forth that supports a telegamming section. I use the 300/1200 Hayes modem and need help to start out on the right track. Reese Warner assured me that I would be taking the right step by subscribing to your Journal, and I am sure I have. If you have any public domain stuff, I would appreciate it. [ See our source code disks for programs published in MacTutor. -Ed.]

Also a useful exercise is to modify the example to suppport selection by double-clicking. Keep up the good work! (Please send me a copy of your submission requirements.) [Submissions are MacWrite file format, with source code provided in both original source form for the source code disk, as well as in a MacWrite format. Illustrations should be in Draw when possible, otherwise in Paint. Always use tabs instead of spaces for alignment. Column width should be set at 2 and 51/8 inches, single spaced.-Ed.]

Loves the Utility and Source Disks

Mike Johnson

Trenton, OH

I'm certainly glad I subscribed to MacTutor with issue #1! I've learned a great many good hints and help on Assembly, Forth and C language programming on the Mac from your articles. Keep up the good work! I see an improvement in the Journal every month. Your source code and utilities disks are greatly appreciated!

How about some help on who's got what? As of May, I have these versions:

Switcher 2.6 [latest is 3.5! -Ed.]

Paint 1.5

Write 4.5

Draw 1.7

Finder 4.1

"New" imagewrite 15 (on Draw disk)

[ These are the latest. Anybody have anything later? -Ed.] MAC C 2.0 with the floating point and other changes seem good. Mac C does run better on a RamDisk. I do wish the MDS linker was a "smarter" on though. Some public domain and shareware stuff seem to be in trouble. I've had problems with SETFILE and the newer KEYCAPS with the new Finder 4.1. Some of the problem seems to be with Apple's new Font/DA mover (ie it seems some resources are being renumbered and some aren't when copied). Does anyone know which of the above are safe to use without crashing or data loss?

I find it rather bewildering at the Paint/Write "musical version" game that has been playing lately. [Aren't we all! -Ed.] Now it seems the Finder, System and Printer drivers have joined the fray. [Don't forget about the laser printer stufftoo! -Ed.] It IS difficult to know just what you now have on a given disk and what may cause trouble later if not updated. Someone sort it out ---PLEASE!!

No Fluff!

Michael Rollins

Broken Arrow, OK

Let's give your programming Journal a try for a year. The NO FLUFF got me.

Megamax C handles Pascal Stacks

Jan Eugenides

Assembly Corner

Please send your writer's kit or whatever you have for contributing editors. [If you don't hear from us, send a MacWrite disk. -Ed.] Now a note for Bob Denny: In your columns in the May and June issue you indicate that routines which are called back from the ROM must be written in assembly language because they must handle the stack Pascal style rather than C style. The Megamax compiler includes a "pascal" directive which tells the compiler to use the stack Pascal style in the following function. This makes life very easy! For example, here is a routine I use for the clikloop routine, to scroll text when the mouse is moved outside the viewrect during selection of text.

pascal clicklooproutine()
{
Point   thept;
Rect  therect;

therect = (**hTE).viewRect;
GetMouse(&thept);
if (thept.a.v>therect.a.bottom)
 {
 SetCtlValue(vshandle,                            GetCtlValue(vshandle)+get_lh());
 edit_scroll();
 }
if(thept.a.h>therect.a.right)
 {
 SetCtlValue(hshandle,                             GetCtlValue(hshandle)+get_lh());
 edit_scroll();
 }
}

This routine is called from TEClick, and all that is necessary is to redraw the controls after TEClick is done (when called this way, SetCtlValue doesn't redraw the controls, don't ask me why!). A simple DrawControls(mywindow) will do it. I am quite pleased with the Megamax in general and would recommend it.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Go from lowly lizard to wicked Wyvern in...
Do you like questing, and do you like dragons? If not then boy is this not the announcement for you, as Loongcheer Game has unveiled Quest Dragon: Idle Mobile Game. Yes, it is amazing Square Enix hasn’t sued them for copyright infringement, but... | Read more »
Aether Gazer unveils Chapter 16 of its m...
After a bit of maintenance, Aether Gazer has released Chapter 16 of its main storyline, titled Night Parade of the Beasts. This big update brings a new character, a special outfit, some special limited-time events, and, of course, an engaging... | Read more »
Challenge those pesky wyverns to a dance...
After recently having you do battle against your foes by wildly flailing Hello Kitty and friends at them, GungHo Online has whipped out another surprising collaboration for Puzzle & Dragons. It is now time to beat your opponents by cha-cha... | Read more »
Pack a magnifying glass and practice you...
Somehow it has already been a year since Torchlight: Infinite launched, and XD Games is celebrating by blending in what sounds like a truly fantastic new update. Fans of Cthulhu rejoice, as Whispering Mist brings some horror elements, and tests... | Read more »
Summon your guild and prepare for war in...
Netmarble is making some pretty big moves with their latest update for Seven Knights Idle Adventure, with a bunch of interesting additions. Two new heroes enter the battle, there are events and bosses abound, and perhaps most interesting, a huge... | Read more »
Make the passage of time your plaything...
While some of us are still waiting for a chance to get our hands on Ash Prime - yes, don’t remind me I could currently buy him this month I’m barely hanging on - Digital Extremes has announced its next anticipated Prime Form for Warframe. Starting... | Read more »
If you can find it and fit through the d...
The holy trinity of amazing company names have come together, to release their equally amazing and adorable mobile game, Hamster Inn. Published by HyperBeard Games, and co-developed by Mum Not Proud and Little Sasquatch Studios, it's time to... | Read more »
Amikin Survival opens for pre-orders on...
Join me on the wonderful trip down the inspiration rabbit hole; much as Palworld seemingly “borrowed” many aspects from the hit Pokemon franchise, it is time for the heavily armed animal survival to also spawn some illegitimate children as Helio... | Read more »
PUBG Mobile teams up with global phenome...
Since launching in 2019, SpyxFamily has exploded to damn near catastrophic popularity, so it was only a matter of time before a mobile game snapped up a collaboration. Enter PUBG Mobile. Until May 12th, players will be able to collect a host of... | Read more »
Embark into the frozen tundra of certain...
Chucklefish, developers of hit action-adventure sandbox game Starbound and owner of one of the cutest logos in gaming, has released their roguelike deck-builder Wildfrost. Created alongside developers Gaziter and Deadpan Games, Wildfrost will... | Read more »

Price Scanner via MacPrices.net

New today at Apple: Series 9 Watches availabl...
Apple is now offering Certified Refurbished Apple Watch Series 9 models on their online store for up to $80 off MSRP, starting at $339. Each Watch includes Apple’s standard one-year warranty, a new... Read more
The latest Apple iPhone deals from wireless c...
We’ve updated our iPhone Price Tracker with the latest carrier deals on Apple’s iPhone 15 family of smartphones as well as previous models including the iPhone 14, 13, 12, 11, and SE. Use our price... Read more
Boost Mobile will sell you an iPhone 11 for $...
Boost Mobile, an MVNO using AT&T and T-Mobile’s networks, is offering an iPhone 11 for $149.99 when purchased with their $40 Unlimited service plan (12GB of premium data). No trade-in is required... Read more
Free iPhone 15 plus Unlimited service for $60...
Boost Infinite, part of MVNO Boost Mobile using AT&T and T-Mobile’s networks, is offering a free 128GB iPhone 15 for $60 per month including their Unlimited service plan (30GB of premium data).... Read more
$300 off any new iPhone with service at Red P...
Red Pocket Mobile has new Apple iPhones on sale for $300 off MSRP when you switch and open up a new line of service. Red Pocket Mobile is a nationwide MVNO using all the major wireless carrier... Read more
Clearance 13-inch M1 MacBook Airs available a...
Apple has clearance 13″ M1 MacBook Airs, Certified Refurbished, available for $759 for 8-Core CPU/7-Core GPU/256GB models and $929 for 8-Core CPU/8-Core GPU/512GB models. Apple’s one-year warranty is... Read more
Updated Apple MacBook Price Trackers
Our Apple award-winning MacBook Price Trackers are continually updated with the latest information on prices, bundles, and availability for 16″ and 14″ MacBook Pros along with 13″ and 15″ MacBook... Read more
Every model of Apple’s 13-inch M3 MacBook Air...
Best Buy has Apple 13″ MacBook Airs with M3 CPUs in stock and on sale today for $100 off MSRP. Prices start at $999. Their prices are the lowest currently available for new 13″ M3 MacBook Airs among... Read more
Sunday Sale: Apple iPad Magic Keyboards for 1...
Walmart has Apple Magic Keyboards for 12.9″ iPad Pros, in Black, on sale for $150 off MSRP on their online store. Sale price for online orders only, in-store price may vary. Order online and choose... Read more
Apple Watch Ultra 2 now available at Apple fo...
Apple has, for the first time, begun offering Certified Refurbished Apple Watch Ultra 2 models in their online store for $679, or $120 off MSRP. Each Watch includes Apple’s standard one-year warranty... Read more

Jobs Board

DMR Technician - *Apple* /iOS Systems - Haml...
…relevant point-of-need technology self-help aids are available as appropriate. ** Apple Systems Administration** **:** Develops solutions for supporting, deploying, Read more
Omnichannel Associate - *Apple* Blossom Mal...
Omnichannel Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Operations Associate - *Apple* Blossom Mall...
Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
IT Systems Engineer ( *Apple* Platforms) - S...
IT Systems Engineer ( Apple Platforms) at SpaceX Hawthorne, CA SpaceX was founded under the belief that a future where humanity is out exploring the stars is Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.