|Column Tag:||On the Lighter Side
By Gar, DataPak Software
Due to the increasing pressure to simplify the Mac Operating System, an unnamed source has given us an advance look at the next major System revisions:
The Bozo Manager
The purpose of the Bozo Manager is to simplify an otherwise complicated set of Toolbox functions and impossible documentation.
In interest of simplicity, the Bozo Manager will exist as Inside Macintosh Vol. 8 and will be precisely five pages (three of which are the copyright page, Table of Contents and Index).
Some of the key functions in the Bozo Manager are as follows:
This procedure just makes a new window, making it the current GrafPort and the front window. It takes no parameters since it knows you simply want a garden-variety window with a pair of scrollbars and a grow box, etc., and of course it is visible and of course it has a go-away box.
JustMakeWindow will always make your window look nice. Note that this procedure does not return a WindowPtr because that would require its structure to be published, hence more complexity and more headaches.
JustMakeWindow is ideal for the beginning Mac programmer because all events are handled for you: when the new window receives an Update event, for instance, your code will be scanned for any "Toolbox routines that draw anything, hence you don't even need to use the Event Manager.
Procedure MeeToo (cloneverb: INTEGER)
The MeeToo procedure lets you create and sell software without writing one single line of code!
This procedure scans the hard drive for an existing application and, once found, launches that program but substitutes your About box.
The cloneverb parameter defines which application to launch, which can be one of the following:
MicrosoftClone = 1
AldusClone = 2
ClarisClone = 3
Note that these three verbs should be sufficient for 99% of all new software under development.
MeeToo is already being used by many developers but is finally being made available to everyone in the new Bozo Manager. It is an invaluable tool because you can market a fat product for which you entire cost is paying someone to use ResEdit for ten minutes.
We recommend, however, that you pad the file with some dummy object code, say 750K or more, as most developers have successfully accomplished.
Procedure UndoSystem (revert: INTEGER)
This procedure un-upgrades the current System software version. The revert parameter indicates which System you wish to revert to.
For example, let's say your application tried to include System 7 features but all of your users bought Mac Classics. Using the Bozo Manager, you could add Undo System to your Edit menu, passing it 6.07, or 4.0, etc., then at launch time the user can move the System version backwards if necessary.
Another use for UndoSystem is when things arent going your way: if all else fails when trying to use Script Manager, Apple Events, Editions Manager, etc. - or when youve just plain had it with suspicious bugs or doggy software, UndoSystem can be called directly from your application.
This procedure loads a special package that will cause the processor to do as you intend, not as you say. Its built-in artificial intelligence will avoid taking your code so literally and will try to do the obvious instructions, just as you intended in the first place.
For example, lets say your program accidentally states for u = 1, but what you really meant was for i = 1. If InitBugFixes was called at launch time, the processor knows that everyone uses i for loops, not u, so it will correct your error.
If for no other reason, the processor will realize that the letter u is right next to i on the keyboard so it can detect your error fairly easily.
InitBugFixes causes the processor to examine all of your code, determine what you really want to do, and will skip over the obvious mistakes. As a fail-safe measure, if a large piece of buggy code is too hard to figure out, the MeeToo function (above) might be called automatically to launch a similar piece of software, transparent to the user. In this case, the closest clone can be determined by examining your window contents, menu items, etc.
Lastly, when InitBugFixes is first called, a mirror-image of all memory is saved to the hard disk and can be loaded later to restore everything, salvaging an otherwise impossible parade of bugs. This way, the user wont ever crash no matter how bad it gets.
However, if InitBugFixes is forced to load the memory image as a last-ditch effort, undo System is automatically appended to your Edit menu so the user can at least go back to how it was before the upgrade. See UndoSystem, above.