Building a menu with the cpConstructor tool

If you want to use the cpConstructor tool to create menus, you need to:

As described earlier, when you create a menu using the cpConstructor tool, you associate an action with each menu item. An action is basically a message that represents a particular operation, for example, "change selected tile to red." When the user selects a menu item, an action is generated and sent to an action handler that knows how to process that action to initiate the associated operation.

This mechanism is provided by the Action framework, one of the GUI Application frameworks. The Action framework allows you to design portions of your program independently, because it allows objects, such as menu items, to send out actions without needing to know anything about the receiver of the action. Likewise, you create a receiver for the action--often the document presenter--that knows how to handle the action but doesn't need to know anything about the sender of the action.

You specify the action associated with the menu item when you build the item in the cpConstructor tool, as described in the section, "Using the cpConstructor tool" on page 86." You create a receiver for the action within the code for your program, as described in "Handling actions" on page 88.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker