And if you need to override a method that MacApp does not declare as virtual , you can modify MacApp's source code to make the necessary change. Each MacApp application has a single instance of an application object, which can be accessed through the global variable gApplication . The application object performs a number of operations, including running the main event loop, dispatching events to objects, and handling commands to open, create, and save documents. It calls on other MacApp objects for services, including an event dispatcher to dispatch Apple events and a Clipboard manager to retrieve desk scrap data and display it in a Clipboard view. As Figure 1-1 shows, an application may have multiple document objects associated with it.
Document objects store data in memory or on disk.
Each document window may have multiple nested views. View objects display data and receive user input. Application, document, window, and view objects may create command objects to perform recordable operations that can be done, undone, and redone. Command objects and other objects created by your application live in the object heap managed by MacApp. Inc. All rights reserved.