MacroPackage: ideToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

with-output-to-ide-listener

Arguments: (&key fresh-prompt expose-listener-frame show-top) &body body

This is a convenience macro for directing debugging output to the currently-selected IDE listener. It binds *standard-output* and *error-output* to the stream returned by selected-listener-pane around the execution of the body. It also first moves the listener's text cursor to the end of the text and calls fresh-line, to ensure that the output begins on a new line at the end of all previous output. For efficiency, the body is executed inside a call to with-delayed-redraw for the listener pane, which will delay the drawing of all output until the body has completed, and then draw it only once.

If fresh-prompt is true, then a prompt is printed after the body has been executed. A fresh prompt is not necessary in order to enter and evaluate a form in the listener, but it may be desired for aesthetic reasons or to indicate that the body has completed.

If expose-listener-frame is true, then the debug window is exposed and selected after the body has completed.

If show-top is true and there is enough output to scroll the first part of the output out of view, then the listener will be scrolled at the end so that the first part of the output is visible at the top of the listener pane.

Note that an IDE Listener process or a process started by Run | Run Project will bind the standardized output variables like *standard-input* and *standard-output* to the selected IDE listener, so standard output in those processes would appear in the IDE listener anyway, whereas other processes will instead bind the variables to the (typically hidden) console window, which is the value of *initial-terminal-io*.

See also format-debug, which uses this macro.


Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version