pop-up-lettered-menu

Function

Package: common-graphics

Arguments: strings &key sortp sort-predicate on-print

Pops up a menu of strings (which should be a list of strings or symbols) labeled by letters. If a listed letter is entered, that string (or symbol) is returned, else nil is returned. sortp, if true, sorts the list according to sort-predicate, which defaults to string<. If on-print is specified, it should be a function of one argument that is applied to each string or symbol for printing in the menu. The symbol-completion menu displayed when you have typed part of a symbol and chosen Search | Complete Symbol is an example of a lettered menu.

Examples:

(pop-up-lettered-menu (list "one" "two" "three"))

displays a menu

a one
b two
c three

while

(pop-up-lettered-menu (list "one" "two" "three") :sortp t)

displays a menu with the entries alphabetical:

a one
b three
c two

and

(pop-up-lettered-menu (list "one" "two" "three") :sortp t 
                      :on-print 'capitalize-object)

displays a menu with the entries alphabetical and capitalized:

a One
b Three
c Two

Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.