[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
The Top-Level Loop from Hell...
- To: firstname.lastname@example.org
- Subject: The Top-Level Loop from Hell...
- From: waander@cs.UMD.EDU (Bill Andersen)
- Date: Wed, 20 Mar 91 16:15:59 -0500
I've been trying to write a top-level loop for a standalone app
which will allow a user to evaluate forms from fred windows via
eval-selection or eval-buffer. No matter what I do the forms just
seem to get queued up until I restore the normal toplevel-loop. I
could just use toplevel-loop but I want to provide an idiot-proof
error handling mechanism. Below is the code for the loop I'm playing
with now. Sorry to repost this question, but I didn't get a
satisfactory response last time. Help!!! I'm at the end of my
rope!!! Thanks in advance.
(defun inner-main-loop (&aux abort-or-cancel-p)
(multiple-value-bind (result error-p)
(multiple-value-bind (form form-supplied-p)
(ask *terminal-io* (get-next-form))
(when (or (eq abort-or-cancel-p :abort)
(eq abort-or-cancel-p :cancel))
(message-dialog (format nil "~aed." abort-or-cancel-p))))
(format nil "The following error occured:~%~s~%Continue, or quit the application?"
(apply #'format nil result))
:cancel-text nil) ;no cancel button