1 CAPI Reference Entries
prompt-for-stringfunction pops up a text input pane and prompts the user for a string.
prompt-for-string message &key text initial-value print-function value-function ok-check pane-args popup-args
print-functionfor that value. If the
print-functionis not specified, then it will default to
princ-to-string. The value returned can be converted into a different value by passing a value-function, which by default is identity. This value-function gets passed the text that was entered into the pane, and should return both the value to return and a flag that should be non-
nilif the value that was entered is not acceptable. If an ok-check is passed, then it should return non-
nilif the value about to be returned is acceptable.
popup-confirmer. Arguments can be passed to the
make-instanceof the pane and the call to
popup-confirmerusing pane-args and popup-args respectively.
(capi:prompt-for-string "Enter a string:")
(capi:prompt-for-string "Enter an integer:" :initial-value 10 :value-function #'(lambda (x) (let ((integer (ignore-errors (read-from-string x)))) (values integer (not (integerp integer)) ))))
Generated with Harlequin WebMaker