1 CAPI Reference Entries

prompt-for-file

Function

Summary

The functionprompt-for-file pops up a dialog prompting the user for a file name.

Syntax

prompt-for-file message &key pathname ok-check pane-args popup-args

Description

The functionprompt-for-file prompts the user for a file using a dialog box, optionally defaulting to pathname. Like all the prompters,prompt-for-file returns two values: the file and a flag indicating success. The success flag will returnnil if the dialog was cancelled, andt otherwise. An ok-check function can be specified, which should return non-nil if a given pathname is valid.

Finally, as with all of the prompting functions, the prompt itself is created by passing an appropriate 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. Currently, the pane used to create the file prompter is internal to the CAPI.

Example

(capi:prompt-for-file "Enter a filename:")

(capi:prompt-for-file "Enter a filename:" :pathname "/usr/bin/cal")

(capi:prompt-for-file "Enter a filename:" :ok-check 'probe-file)

See Also

popup-confirmer
prompt-for-string


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

Generated with Harlequin WebMaker