Important: The information in this document is obsolete and should not be used for new development.
Overview
Every MacApp application has amain
routine, supplied by the developer, that is executed when the application is launched by the operating system. Themain
routine initializes MacApp, instantiates an application object, and calls theRun
method of that object. Calling theRun
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. TheTApplication
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 fromTVUApplication
, 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 ofTApplication
.