1 CAPI Reference Entries

prompt-for-symbol

Function

Summary

Theprompt-for-symbol function pops up a text input pane and prompts the user for a symbol. The symbols that are valid can be constrained in a number of ways.

Syntax

prompt-for-symbol message
                  &key
                  symbols package ok-check
                  pane-args popup-args

Description

This function prompts the user for a symbol which they should type into a string prompter. The symbols that are valid can be constrained in a number of ways. The keyword arguments are a list of all valid symbols, a package in which the symbol must be available, and an ok-check function which when called on a symbol will return non-nil if the symbol is valid.

Finally, as with all of the prompting functions, the prompter is created by passing an appropriate pane (in this case a text input pane) 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-for-symbol "Enter a symbol:")

(capi:prompt-for-symbol "Enter a symbol:" :package 'cl)

(capi:prompt-for-symbol "Enter a symbol:" :symbols '(foo bar baz))

(capi:prompt-for-symbol "Enter a symbol:" :ok-check #'(lambda (symbol) (string< symbol "B")))

See Also

prompt-for-form
prompt-for-string
popup-confirmer
text-input-pane


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

Generated with Harlequin WebMaker