11.2 Defining Commands the Easy Way

11.2.1 Command Names and Command Line Names

Every command has a command name, which is a symbol. The symbol names the function that implements the command. The body of the command is the function definition of that symbol.

By convention, commands are named with acom- prefix, although CLIM does not enforce this convention.

To avoid collisions among command names, each application should live in its own package; for example, there might be several commands namedcom-show-chartdefined for each of a spreadsheet, a navigation program, and a medical application.

CLIM supports a command line name which is the "command" that the end user sees and uses, as opposed to the construct that is the command's actual name. For example, the commandcom-show-chart would have a command-line name ofShow Chart. When defining a command using define-command (or the application's command defining macro), you can have a command line name generated automatically. As you can see from this example, the automatically generated command line name consists of the command's name with the hyphens replaced by spaces and the words capitalized. Anycom- prefix is removed.

CLIM 2.0 User's Guide - OCT 1998

Generated with Harlequin WebMaker