Important: The information in this document is obsolete and should not be used for new development.
Calling Run to Put MacApp in Control
After yourmain
routine initializes MacApp and creates and initializes an application object, it makes the following call:
aYourApplication->Run();TheTApplication::Run
method checks that there is enough memory to run the application, calls the application object'sDoLaunchClipboard
method, and finally callsMainEventLoop
, which starts the application running, looking for incoming events to dispatch.Launching the Clipboard
The InitUClipboardMgr
routine (called previously fromDoInitUMacApp
) instantiates a global Clipboard manager object,gClipBoardMgr
. The application object'sDoLaunchClipboard
method now performs additional setup for MacApp's Clipboard support.
DoLaunchClipboard
calls thegClipBoardMgr
object'sLaunch
method. TheLaunch
method makes sure there is a Clipboard window, then adds thegClipBoardMgr
object to the application object's behavior list so it can respond to events that might affect Clipboard operations.The
Launch
method then checks the desk scrap for information and calls the application object'sMakeViewForAlienClipboard
method. Your application object can overrideMakeViewForAlienClipboard
to look for your private data types on the desk scrap and display any data it finds. MacApp's default Clipboard support automatically displays'PICT'
and'TEXT'
data.For more information, see "The Clipboard," beginning on page 129.