=== Top of the Swiki === Attachments ===
Recipe: Printing some Status Information from Your Program
Printing some Status Information from Your Program
Problem
You want to print some status messages while your program runs, mainly for debugging purposes.
Solution
Open the Transcript Window, then use Transcript like this:
Transcript show: 'Hello World!'.
Discussion
Transcript is a global variable that contains an instance of TranscriptStream. Use Transcript cr. to get a line feed. You may also combine those messages like this: Transcript show: 'Hello World'; cr.
See Also
The comment of the TranscriptStream class>>new method shows how to open your own window that is independent from the system's Transcript. [Maybe this should be included in the discussion]
Questions
If you have a question related to this recipe, put it here.
How do you put a string into a new Workspace? I'd like to have something like Workspace openWith: aString, giving a new window with aString in it.
Answer:
Workspace new contents: 'Hello World!'; openLabel: 'Hello'