Help - Glossary - T - Transcripts

The Transcript is a Workspace that is used by Squeak (as in Smalltalk) as a standard repository of information. You can get or open one by putting the cursor in the Project-window and typing Cmd-t. Then you can address it with code, such as

Transcript show: 'Hello world'; cr. "Big applause for Squeak's Hello world program you waited for."
Transcript show: Date today; cr.
Transcript show: 5+4+3+2+1.

And so on, including the following five lines, for Cmd-d.

| input number output |
input := FillInTheBlankMorph request: 'Numerical input'.
"A way to get user-input"
number := input asNumber.
"FillInTheBlankMorph returns strings. This converts it."
output := [:x | (x sin) - (x cos)] value: number.
"Play with your own formulas in a workspace"
Transcript cr; show: input; tab; show: output.
"Put input and output on a new line of Transcript."

As you may have noticed:

Transcript clear. "This clears the Transcript, you will be surprised to now."

Squeak also reports itself to a Transcript, for example when the image gets saved. As said, Transcripts also work like Workspaces. The cr adds a new line. See also Cascades.

If you like logical self-reference put the following in a Transcript and do Cmd-d on it and again on what it prints out:

Transcript cr; show: 'Transcript cr; show: ''This is the Transcript'' '

If you don't like logical self-reference, don't bother - but check out how to use Workspaces. When writing code in a Workspace it is often helpful to send output of the code to the Transcript.

- T