There are many different ways to view output generated by the environment. In many tools, for example, output appears as soon as it is generated - this happens, for instance, when you compile code in the built-in editor.
At other times, you can view output in a tool called the Output Browser. This tool collects together
all
the output generated by the environment, and is particularly useful for viewing output generated by your own processes (which cannot be displayed in any other environment tool). The Output Browser displays all the output sent to the default value of the variable *standard-output*
.
(capi:contain
(make-instance 'capi:push-button-panel
:items '(:red :yellow :blue)
:selection-callback
#'(lambda (data interface)
(format t
"Pressed button in interface ~S~% data=~S~%"
interface data))))
This is a piece of CAPI code that creates a window with three buttons, labeled RED , YELLOW and BLUE , as shown in Example CAPI window. Pressing any of these buttons prints the value of the button pressed.
Figure 2.5 Example CAPI window
(capi:contain (make-instance
'capi:text-input-pane
:callback #'(lambda (text interface)
(format t
"You entered: ~S~%" text))
:title "My Text Input Pane"))
The object that this code creates is going to demonstrate the Inspector tool. The code above creates a window containing a text input pane. You can type text directly into a text input pane, and this can be passed, for instance, to other functions for further processing.
hello
into the text input pane and press Return
. Look at the generated output in the output view.LispWorks IDE User Guide (Unix version) - 13 Sep 2017