prompt-for-directory
message
&key
if-does-not-exist
pathname
pane-args
popup-args
owner
=>
result, successp
A string.
One of
:ok
,
:prompt
or
:error
.
A pathname, or
nil
.
Arguments to pass to the pane.
Arguments to pass to the confirmer.
An owner window.
The function
prompt-for-directory
prompts the user for a directory pathname using a dialog box. Like all the prompters,
prompt-for-directory
returns two values: the directory pathname and a flag indicating success. The
successp
flag will be
nil
if the dialog was cancelled, and
t
otherwise.
If
if-does-not-exist
is
:ok
, a non-existent directory can be chosen. When set to
:prompt
, if a non-existent directory is chosen, the user is prompted for whether the directory should be created. When set to
:error
, the user cannot choose a non existent directory. The default value of
if-does-not-exist
is
:prompt
.
pathname
, if non-
nil
, supplies an initial directory for the dialog. The default value for
pathname
is
nil
, and with this value the dialog initializes with the current working directory.
owner specifies an owner window for the dialog. See the "Prompting for Input" chapter in the LispWorks CAPI User Guide for details.
The prompt itself is created by passing an appropriate 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. Currently, the pane used to create the file prompter is internal to the CAPI.