1 CAPI Reference Entries

prompt-with-list

Function

Summary

Theprompt-with-list function prompts the user to make a choice from a list. By default the choice is a list panel.

Syntax

prompt-with-list items message
                 &key
                 choice-class interaction value-function
                 pane-args popup-args

Description

This function prompts the user with a list of items from which they must select a certain number. By default, the user is prompted with a single selection list panel, but the class of pane (which must be a choice) can be specified using choice-class, and the interaction can be specified with interaction. Finally the value that is returned is usually the selected items, but a value-function can be supplied that gets passed the result and can then return a new result.

For single selection, the dialog has an OK and a Cancel button, while for other selections it has Yes, No and Cancel buttons where Yes means accept the selection, No means accept a null selection and Cancel behaves as normal.

Finally, as with all of the prompting functions, the prompter is created by passing an appropriate pane (in this case an instance of class choice-class) topopup-confirmer. Arguments can be passed to themake-instance of the pane and the call topopup-confirmer using pane-args and popup-args respectively.

Examples

(capi:prompt-with-list
  '(1 2 3 4 5) "Select an item:")

(capi:prompt-with-list '(1 2 3 4 5) "Select some items:" :interaction :multiple-selection)

(capi:prompt-with-list '(1 2 3 4 5) "Select an item:" :choice-class 'capi:button-panel)

(capi:prompt-with-list '(1 2 3 4 5) "Select an item:" :interaction :multiple-selection :choice-class 'capi:button-panel)

(capi:prompt-with-list '(1 2 3 4 5) "Select an item:" :interaction :multiple-selection :choice-class 'capi:button-panel :pane-args '(:layout-class capi:column-layout))

See Also

popup-confirmer
list-panel
choice


CAPI Reference Manual, Liquid Common Lisp Version 5.0 - 3 OCT 1997

Generated with Harlequin WebMaker