Next Prev Up Top Contents Index

prompt-for-symbol

Function
Summary

The prompt-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) to popup-confirmer . Arguments can be passed to the make-instance of the pane and the call to popup-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


LispWorks CAPI Reference Manual - 14 Dec 2001

Next Prev Up Top Contents Index