links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
TranscriptStream new openLabel: 'MyReport'.
Last updated at 9:32 pm UTC on 30 October 2020
A straightforward way to construct a report

 s := TranscriptStream new openLabel: 'Square numbers'.
 1 to: 12 do: [:n | s model show: n printString.
	             s model show: ', ' .
	             s model show:  n  n printString.
                    s model cr]

 openLabel: aString 
	"Open a window on this transcriptStream"
	^ToolBuilder open: self label: aString

buildWith: builder
	| windowSpec textSpec |
	windowSpec := builder pluggableWindowSpec new.
	windowSpec model: self.
	windowSpec label: 'Transcript'.
	windowSpec children: OrderedCollection new.

	textSpec := builder pluggableTextSpec new.
		model: self;
		menu: #codePaneMenu:shifted:;
		frame: (0@0corner: 1@1).
	windowSpec children add: textSpec.

	^builder build: windowSpec