The following code creates a window with a menu bar containing the menu and secondary menu illustrated at right. The menu bar contains one item, File, that drops down a menu containing two items, Open and Close. If Close is selected, the fileMenu:clientData:callData: method is invoked. If Open is selected, a secondary menu containing three items is dropped down. Choosing one of the three items invokes the openMenu:clientData:callData: method.
|