[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Toplevel Loop Problems...
- To: firstname.lastname@example.org
- Subject: Toplevel Loop Problems...
- From: waander@cs.UMD.EDU (Bill Andersen)
- Date: Wed, 13 Mar 91 23:50:07 -0500
I am using this toplevel loop in a standalone application. Most of
it is borrowed from the "Math Loop" example in ccl;examples. I just
need to use Fred editor windows with the application so as to be able
to evaluate forms from the editor, by EVALing forms from
The problem is that the call to GET-NEXT-FORM does not seem to
remove anything from the *terminal-io* queue. When I quit my toplevel
loop, all the queued forms get evaluated (presumably by the normal
Can someone tell me why this doesn't work, and what to do about it?
Weren't there some difficulties with GET-NEXT-FORM reported earlier?
Another question: Why does the example code include a
MULTIPLE-VALUE-BIND when MESSAGE-DIALOG apparently only returns one
value? Thanks in advance.
(defun inner-main-loop (&aux abort-or-cancel-p)
(multiple-value-bind (result error-p)
;; Process forms normally
(eval (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