All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

prompt-for-forms Function

Summary

Displays a text input pane prompting the user for a number of forms.

Package

capi

Signature

prompt-for-forms message &key package initial-value value-function pane-args popup-args continuation => result, okp

Arguments
message
A string or nil.
package
A package or nil.
initial-value
A list.
value-function
A function, or nil.
pane-args
Arguments to pass to the pane.
popup-args
Arguments to pass to the confirmer.
continuation
A function or nil.
Values
result
A list.
okp
A boolean.
Description

The function prompt-for-forms prompts the user for a number of forms by providing a text input pane that the forms can be typed into, and it returns the forms in a list. The forms are read in the specified package or *package* if not. If value-function is provided it overrides the default value function which reads space-separated forms and returns a list of them.

message supplies a title for the dialog.

The printed version of initial-value will be placed into the text input pane as a default.

If continuation is non-nil, then it must be a function with a lambda list that accepts two arguments. continuation is called with the values that would normally be returned by prompt-for-forms. On Cocoa, passing continuation causes the dialog to be made as a window-modal sheet and prompt-for-forms returns immediately, leaving the dialog on the screen. The with-dialog-results macro provides a convenient way to create a continuation function.

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

Try the following example, and enter 1 2 3 into the input pane.

(capi:prompt-for-forms "Enter some forms:")
See also

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


CAPI User Guide and Reference Manual (Unix version) - 01 Dec 2021 19:32:42