Info-Mac Archive Downloads: dev/src/ SourceCode

Back to dev/src/ SourceCode

mymenv-notify - a classlib for a few Mac chores (source) (my-menv-notify-c.hqx)

Download my-menv-notify-c.hqx (43,416 KB)


From: (Kiselyov Oleg) oleg@ponder.csci.unt.edu
Subject: mymenv-notify - a classlib for a few Mac chores (source)

What: utility C++ functions/classes for a few very common Mac chores

Highlights:
- posting of synchronous _and_ asynchronous notifications
- printf() in an alert box
- "magic" conversion from a C to Pascal string
- do_well() macro to make sure a "system call" went well
- handling of mandatory Apple Events: OpenApplication,
{Open|Print}Document, Quit:
registering C++ classes as recipients of AppleEvents
a trick of relaying AppleEvents to (abstract) C++ classes for processing
- template of a generic drop box: an application that handles files dropped
upon it
- with the complete source and comments/explanations

Keywords: notification, AppleEvent, utility, registration, dropbox,
programming support, environment

Note: The environment is used in most of my Mac software (incl. the one
submitted to the Info-Mac)
Language: C++, CodeWarrior9
System: System 7.1 - 7.5.3, binaries are made for a PowerMac.
Comments to: oleg@ponder.csci.unt.edu, oleg@unt.edu
Version 2.0, June 1996

New in version 2.0
- renamed myenv.* into mymenv.* to avoid name conflicts with my (UNIX)
C++ environment
- renamed message()/_error() into alert()/_die() for the same reason:
the former (declared in my advanced C++ i/o package) write into a
SIOUX console; the latter functions display an alert
- "magic" conversion from C to Pascal string
- Handling of Mandatory Apple Events OpenApplication, {Open|Print}Document,
Quit
- Now works under CW9 (the previous version was compiled with Symantec
C++ 6.0)