| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
For example, you can use this hierarchy to enable or disable your programhs menu items according
to circumstances. This behavior is controlled via events of type kEventCommandUpdateStatus,
which ask whether a particular item should be enabled or disabled on the menu. On receiving
such an event for, say, the Close command on your programhs File menu, you might have an
event handler associated with the application event target (the outermost target in the hierarchy)
disable the menu, while a handler associated with an individual window enables it. If your
program has at least one window open on the screen, the event will be handled by the windowhs
event handler; if not, it will propagate outward to the application event handler. The Close
command will thus be enabled if there are any windows present, but disabled if there arenht.
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.