graphical-read-eval-print-loop in Miscellaneous
Similar to MzScheme's read-eval-print-loop, except that none of
read-eval-print-loop's configuration parameters are used (such
as current-read) and the interaction occurs in a GUI window
instead of using the current input and output ports.
Expressions entered into the graphical read-eval-print loop can be
evaluated in an eventspace (and thread) that is distinct from the one
implementing the graphical-read-eval-print-loop
window (i.e., the current eventspace when
graphical-read-eval-print-loop is called).
If no eventspace is provided, or if #f is provided, an
evaluation eventspace is created using
( with a new custodian; the
eventspace and its threads are be shut down when the user closes the
make-eventspace)graphical-read-eval-print-loop window. If an
eventspace is provided, closing the window performs no shut-down
actions on eventspace.
When redirect-ports? is true, the following parameters are
initialized in the created eventspace's handler thread:
current-output-port -- writes to the frame
current-error-port -- writes to the frame
current-input-port -- always returns eof
See (see parameters, section 7.7 in PLT MzScheme: Language Manual) for more information about these parameters.
The keymap for the read-eval-print loop's editor is initialized by
calling the current keymap initializer procedure, which is determined
by the
current-text-keymap-initializer parameter.
(graphical-read-eval-print-loop -> void
eval-eventspace redirect-ports?)
eval-eventspace = : eventspace
#f
redirect-ports? = : boolean(not eval-eventspace)