NextPrevUpTopContentsIndex

prompt-for-value

Function
Summary

Prompts the user for a form to evaluate.

Package

capi

Signature

prompt-for-value message &key package initial-value
value-function pane-args popup-args

Description

The function prompt-for-value prompts the user for a form and returns the result of evaluating that form.

The form is read in the package if specified or *package* if not and the result is the evaluation of the form.

If initial-value is supplied it provides a default form.

If value-function is supplied it overrides the default value function which reads the form and evaluates it.

The prompter is created by passing 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
(capi:prompt-for-value 
 "Square" 
 :initial-value '(+ 1 2 3) 
 :value-function 
 #'(lambda (text) 
     (let ((res (eval (read-from-string text))))
       (* res res))))
See also

prompt-for-form


LispWorks CAPI Reference Manual - 11 Apr 2005

NextPrevUpTopContentsIndex