Q Under Mac OS 8.5, when I call the Control
Strip API at boot time the Mac crashes. I have verified that
ControlStripDispatch is implemented. What is the source
of the crash?
A Any extension calling the Control Strip
software should be sure that the Control Strip exists and is loaded
before it attempts to make any call to it. Just checking that
ControlStripDispatch trap is implemented is
insufficient.
Starting with Mac OS 8.5, Control Strip is an application and is
not loaded at startup time. Therefore extensions cannot make Control
Strip calls (such as SPBShowHideControlStrip ) at startup
time. Calling Control Strip routines when Control Strip is not
running will cause a crash.
The proper way for an application or extension to determine if it
is safe to call Control Strip is to use Gestalt with the
gestaltControlStripAttr selector and check that the
gestaltControlStripExists bit is set, which indicates
that Control Strip and its complete API is available. The following
code shows how to do this: |