Apple II
Technical Notes
_____________________________________________________________________________
                                                  Developer Technical Support

Apple IIgs
#24:    Apple IIgs Toolbox Reference Updates

Revised by:    Dave Lyons, C.K. Haun, Eric Soldan              September 1990
               & Matt Deatherage
Written by:    Rilla Reynolds                                    October 1987

This Technical Note documents changes to the Apple IIgs Toolbox Reference 
manuals.  Please contact Apple II Developer Technical Support at the address 
listed in Apple II Technical Note #0 if you have additional corrections or 
suggestions for any of the Apple IIgs Toolbox documentation.
Changes since July 1990:  Added information on FixAppleMenu, GetMItem, 
ReadAsciiTime, and NewWindow2.
_____________________________________________________________________________

The current Apple IIgs Toolbox reference material is Apple IIgs Toolbox 
Reference, volumes 1 to 3 as well as this Technical Note.  (The Apple IIgs 
Toolbox Reference Update beta draft from APDA is obsolete and should not be 
used.)


Corrections to Volume 1

FixAppleMenu Can Die With Error $0512

Fatal system error $0512 comes from FixAppleMenu (in the Desk Manager).  It 
means that one of your installed New Desk Accessories does not have a well-
formed menu title string.  In particular, the required backslash (\) character 
was not found (make sure bit seven is off).

The List Manager Wants the Port Set Properly

The List Manager expects the current grafPort to be set properly before you 
make most List Manager calls; drawing can occur in funny places if the 
grafPort is not set properly before calls that draw (like SelectMember2).  
Most List Manager calls, and many other toolbox calls, require that the 
current grafPort be explicitly set.  Before you call List Manager routines 
that draw, set the current port to your window with a SetPort call.  Remember 
the note in Volume 2 under the NewWindow call--"Important:  NewWindow does not 
set the current port, but many routines require that a current port exist.  
Use the QuickDraw II routine SetPort to set the current port."  Using SetPort 
can prevent toolbox confusion and reduce your debugging time.

Error $0F02 from GetMItemName

GetMItemName returns error $0F02 if the specified menu item is not found.

ReadAsciiTime Result Buffer

The description of ReadAsciiTime (in the Miscellaneous tools) on page 14-16 
should say the most significant bit (not byte) of each character is set to 
one.

Corrections to Volume 2

QuickDraw Auxiliary Error Codes

Following are some error codes from QuickDraw Auxiliary that are not listed in 
volume 2.

    $1210: picEmpty
    $1211: picAlreadyOpen
    $1212: pictureError

    $1221: badRect
    $1222: badMode

FrameRgn Does Not Contribute to an Open Region

The description of the FrameRgn routine on page 16-106 in the Apple IIgs 
Toolbox Reference, Volume 2 states that FrameRgn will contribute to a region 
definition if a region is open when FrameRgn is called.  This is incorrect; 
FrameRgn does not contribute to the region being defined.  To add a region to 
another region, use XorRgn or UnionRgn.

Window Manager, "Draw Information Bar Routine"

On page 25-23, the code to clean up the stack is incorrect.  On the sta <14, 
the comment "Works because stack and direct page are equal" is no longer true--
they were equal until the PLY two lines earlier.  One way to correct the code 
is to replace sta <14 with sta 14,s and sta <12 with sta 12,s.


Corrections to Volume 3

Errors from AddToRunQ and RemoveFromRunQ

The Desk Manager chapter, page 29-6, states no errors are possible for 
AddToRunQ, but any errors from the Miscellaneous Tools routine AddToQueue are 
returned unchanged.

Page 29-8 states no errors are possible from RemoveFromRunQ, but any errors 
from DeleteFromQueue are returned unchanged.

NewWindow2 Parameters Override Template Even When You Pass NIL

The description of the NewWindow2 call on page 52-32 is in error.  The 
description of the titlePtr, refCon, contentDrawPtr, and defProcPtr says, "To 
prevent NewWindow2 from replacing the template values, supply NIL pointers..."  
This is only  true for the titlePtr parameter--if you pass NIL for any of the 
other parameters then the value of that parameter in your window record is 
also NIL, no matter what the template value was.  In other words, if you have 
the value $99 stored in your template refCon field, and you pass NIL for the 
refCon value in a NewWindow2 call, the value of the refCon in the returned 
grafPortPtr is NIL.


Further Reference:
_____________________________________________________________________________
  o  Apple IIgs Toolbox Reference, Volumes 1-3

