Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Programmer's Guide to MacApp / Part 2 - Working With MacApp
Chapter 11 - Working With Applications


Overview

Every MacApp application has a main routine, supplied by the developer, that is executed when the application is launched by the operating system. The main routine initializes MacApp, instantiates an application object, and calls the Run method of that object. Calling the Run method gives control to the application object's main event loop, which receives events and dispatches them to objects in your application.

The application object is instantiated from a subclass you define, based on MacApp's TApplication class. The TApplication class supports operations that affect the application as a whole, such as displaying the About box, opening a file, creating a new file, receiving and dispatching events, and dismissing the application. Among its other duties, the application object sets up the application's menus, keeps a list of open documents, handles certain menu commands, and keeps track of cursor and help regions.

Since the TApplication class descends from TVUApplication, it can support Virtual User. Virtual User provides a mechanism for automated testing of application functions. You turn on Virtual User support with the -NeedsVU build flag. Build flags are described in Appendix A.

If your application supports PowerTalk mailers, your application class should descend from the TMailingApplication class, a subclass of TApplication.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
25 JUL 1996