Next Prev Up Top Contents Index

1.4.2.6 Command Loop

The outermost level of an application is an infinite interaction processing loop, similar to the Lisp read-eval-print loop, called a command loop . The arguments to commands are defined in terms of the presentation type facility, so that command arguments can be specified via keyboard or mouse input.

It is also possible to map presentation types to commands that operate on arguments of those types. Thus you can invoke commands by clicking on displayed data. For example, in the address book example, as the command loop awaits commands, any command display objects would be sensitive. By using the define-presentation-to-command-translator macro, however, many other presentation types can in effect be turned into commands. A click on a name in the index could represent the "Select Address" command. Similarly, clicking on a field in the displayed address, such as the "Number:" field, could be translated into the "Change Address Number" command, as illustrated in Figure 4..

 

Figure 4. Using Presentation-to-Command Translators

Common Lisp Interface Manager 2.0 User Guide - 14 Dec 2001

Next Prev Up Top Contents Index