Previous Book Contents Book Index Next

Inside Macintosh: Programmer's Guide to MacApp / Part 1 - MacApp Theory and Architecture

Chapter 5 -
Events and Commands

This chapter provides a detailed look at how MacApp processes events and commands. These related topics are also described:

Before reading this chapter, you may want to read Chapter 1, "MacApp Overview."

Chapter Contents
Events and Commands
The Command Queue
The Main Event Loop
Event- and Command-Handling Classes
Dispatching Events
Direct Dispatching
View Hierarchy Dispatching
Mouse-Down Events
Mouse-Up Events
Target Chain Dispatching
Behaviors and the Target Chain
Menu Commands
Key-Down Events
Receiving Key-Up Events
Dispatching Key-Up Events
Alien Events
Dispatching High-Level Events
Target Management
Automatic Target Changes
Manual Target Changes
Target Validation
Target Change Notification
Performing Operations With Command Objects
Command Handlers
The Application Object
Command Objects
The Command Context
The Command Context for Classes That Handle Apple Events
When a Command Is Complete
Command Numbering
Performing a Command Operation
Command Objects and Apple Events
Using a Command Object That Sends an Apple Event
Using a Command Object to Respond to an Apple Event
Linked Commands
Undoing a Command Operation
The Undo/Redo Menu Item
The Undo/Redo Flow of Control
Commands and Change Notification
Commands and the Clipboard
The Clipboard
The Clipboard Manager
Interacting With the Clipboard
MacApp's Menu Management
Components of MacApp Menu Management
MacApp's Command-Numbering System
Creating Menu Numbers on the Fly
Optimized Menu Setup
MacApp's Idling Mechanism
The Cohandler Chain
How Idling Happens
The Three Phases of Idling
Distributing Idle Time
The Sequence of Idle Phases
Idle Thoughts
Responding to Alien Events With a Cohandler

Previous Book Contents Book Index Next

© Apple Computer, Inc.
25 JUL 1996