NextPrevUpTopContentsIndex

prompt-for-form

Function
Summary

Displays a text input pane and prompts the user for a form.

Package

capi

Signature

prompt-for-form message &key package initial-value evaluate
quotify ok-check value-function pane-args
popup-args

Description

The function prompt-for-form prompts the user for a form by providing a text input pane that the form can be typed into.

The form is read in the package if specified or *package* if not. If evaluate is non- nil then the result is the evaluation of the form, otherwise it is just the form itself. The printed version of initial-value will be placed into the text input pane as a default, unless quotify , which defaults to evaluate , specifies otherwise. If value-function is provided it overrides the default value function which reads the form and evaluates it when required. If the ok-check is provided it will be passed the entered form and should return t if the form is a valid result.

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.

Example

Try the following examples, and each time enter (+ 1 2) into the input pane.

(capi:prompt-for-form "Enter a form:")
(capi:prompt-for-form "Enter a form:" :evaluate nil)
See also

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


LispWorks CAPI Reference Manual - 11 Apr 2005

NextPrevUpTopContentsIndex