September 2002
Intermediate to advanced
1272 pages
31h 12m
English
The NSMenuItem class contains all the information relating to a specific menu item. Several attributes, which are shown in Table 16.1, are common to all menu items.
| Menu Item Property | Purpose |
|---|---|
| title | The text displayed on the item, such as Cut. An NSString object. |
| image | An optional NSImagethat is displayed to the left of the menu item’s title. |
| key equivalent | The key that can be used in conjunction with the Cmd key to activate the item from the keyboard. (Cmd-C for Cut) An NSStringobject. |
| target | The target object that will receive a message when the item is chosen. Often, this is nil, which sends the message to the first responder. |
| action | The Objective-C selector for the action message to be sent ... |
Read now
Unlock full access