author | claus |
Mon, 06 Feb 1995 01:53:30 +0100 | |
changeset 77 | 565b052f5277 |
parent 63 | f4eaf04d1eaf |
child 80 | 5a878a1eebf2 |
permissions | -rw-r--r-- |
0 | 1 |
" |
5 | 2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
59 | 3 |
All Rights Reserved |
0 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
EditTextView subclass:#TextCollector |
|
14 |
instanceVariableNames:'entryStream lineLimit destroyAction |
|
59 | 15 |
outstandingLines outstandingLine |
16 |
flushBlock flushPending collecting timeDelay access' |
|
0 | 17 |
classVariableNames:'' |
18 |
poolDictionaries:'' |
|
19 |
category:'Views-Text' |
|
20 |
! |
|
21 |
||
22 |
TextCollector comment:' |
|
5 | 23 |
COPYRIGHT (c) 1989 by Claus Gittinger |
59 | 24 |
All Rights Reserved |
0 | 25 |
|
77 | 26 |
$Header: /cvs/stx/stx/libwidg/Attic/TextColl.st,v 1.13 1995-02-06 00:53:22 claus Exp $ |
15 | 27 |
'! |
28 |
||
29 |
!TextCollector class methodsFor:'documentation'! |
|
30 |
||
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
31 |
copyright |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
32 |
" |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
33 |
COPYRIGHT (c) 1989 by Claus Gittinger |
59 | 34 |
All Rights Reserved |
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
35 |
|
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
36 |
This software is furnished under a license and may be used |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
37 |
only in accordance with the terms of that license and with the |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
38 |
inclusion of the above copyright notice. This software may not |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
39 |
be provided or otherwise made available to, or used by, any |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
40 |
other person. No title to or ownership of the software is |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
41 |
hereby transferred. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
42 |
" |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
43 |
! |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
44 |
|
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
45 |
version |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
46 |
" |
77 | 47 |
$Header: /cvs/stx/stx/libwidg/Attic/TextColl.st,v 1.13 1995-02-06 00:53:22 claus Exp $ |
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
48 |
" |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
49 |
! |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
50 |
|
15 | 51 |
documentation |
52 |
" |
|
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
53 |
a view for editable text, which also understands some stream messages. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
54 |
Instances of this view can take the place of a stream and display the |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
55 |
received text. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
56 |
Its main use in the system is the Transcript, but it can also be used for |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
57 |
things like trace-windows etc. |
0 | 58 |
|
60 | 59 |
If collecting is turned on, a textcollector will not immediately display |
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
60 |
entered text, but wait for some short time (timeDelay) and collect incoming |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
61 |
data - finally updating the whole chunk in one piece. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
62 |
This helps slow display devices, which would otherwise scroll a lot. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
63 |
(on fast displays this is less of a problem). |
15 | 64 |
|
60 | 65 |
The total number of lines kept is controlled by lineLimit, if more lines |
66 |
than this limit are added at the bottom, the textcollector will forget lines |
|
67 |
at the top. |
|
68 |
You can set linelimit to nil (i.e. no limit), but you may need a lot |
|
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
69 |
of memory then ... |
77 | 70 |
|
71 |
StyleSheet paramters: |
|
72 |
||
73 |
transcriptForegroundColor defaults to textForegroundColor |
|
74 |
transcriptBackgroundColor' defaults to textBackgroundColor. |
|
75 |
||
76 |
transcriptCursorForegroundColor |
|
77 |
transcriptCursorBackgroundColor |
|
15 | 78 |
" |
79 |
! ! |
|
0 | 80 |
|
81 |
!TextCollector class methodsFor:'defaults'! |
|
82 |
||
83 |
defaultLineLimit |
|
15 | 84 |
"the number of lines remembered by default" |
85 |
||
86 |
^ 600 |
|
87 |
! |
|
88 |
||
60 | 89 |
defaultTranscriptSize |
90 |
"the number of cols/lines by which the Transcript should come up" |
|
91 |
||
92 |
^ 70@11 |
|
93 |
! |
|
94 |
||
15 | 95 |
defaultTimeDelay |
96 |
"the time in seconds to wait & collect by default" |
|
97 |
||
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
98 |
^ 0.3 |
0 | 99 |
! ! |
100 |
||
101 |
!TextCollector class methodsFor:'instance creation'! |
|
102 |
||
103 |
newTranscript |
|
60 | 104 |
|topView transcript f v fg bg cFg cBg lines cols| |
0 | 105 |
|
7 | 106 |
topView := StandardSystemView label:'Transcript' minExtent:(100 @ 100). |
0 | 107 |
|
60 | 108 |
v := HVScrollableView for:self miniScrollerH:true miniScrollerV:false in:topView. |
0 | 109 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
110 |
transcript := v scrolledView. |
|
111 |
"transcript partialLines:false." |
|
112 |
||
113 |
f := transcript font. |
|
60 | 114 |
|
115 |
" |
|
116 |
should add the height of the frame & scrollbars to be exact ... |
|
117 |
" |
|
118 |
cols := self defaultTranscriptSize x. |
|
119 |
lines := self defaultTranscriptSize y. |
|
120 |
topView extent:(((f widthOf:'x') * cols) @ (f height * lines)). |
|
0 | 121 |
|
122 |
Smalltalk at:#Transcript put:transcript. |
|
123 |
||
60 | 124 |
" |
125 |
fancy feature: whenever Transcript is closed, reset to StdError |
|
126 |
" |
|
0 | 127 |
transcript destroyAction:[Smalltalk at:#Transcript put:Stderr]. |
128 |
||
60 | 129 |
fg := StyleSheet colorAt:'transcriptForegroundColor' default:transcript foregroundColor. |
130 |
bg := StyleSheet colorAt:'transcriptBackgroundColor' default:transcript backgroundColor. |
|
59 | 131 |
transcript foregroundColor:fg backgroundColor:bg. |
77 | 132 |
transcript viewBackground:bg. |
59 | 133 |
|
60 | 134 |
cFg := StyleSheet colorAt:'transcriptCursorForegroundColor' default:bg. |
135 |
cBg := StyleSheet colorAt:'transcriptCursorBackgroundColor' default:fg. |
|
59 | 136 |
transcript cursorForegroundColor:cFg backgroundColor:cBg. |
137 |
||
22 | 138 |
topView open. |
15 | 139 |
"transcript lineLimit:1000. " "or whatever you think makes sense" |
140 |
||
0 | 141 |
^ transcript |
142 |
! ! |
|
143 |
||
144 |
!TextCollector methodsFor:'initialize / release'! |
|
145 |
||
146 |
initialize |
|
147 |
super initialize. |
|
148 |
||
149 |
outstandingLines := OrderedCollection new. |
|
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
150 |
|
0 | 151 |
flushBlock := [self endEntry]. |
152 |
flushPending := false. |
|
15 | 153 |
collecting := true. |
154 |
timeDelay := self class defaultTimeDelay. |
|
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
155 |
access := Semaphore forMutualExclusion. |
0 | 156 |
|
157 |
lineLimit := self class defaultLineLimit. |
|
158 |
entryStream := ActorStream new. |
|
159 |
entryStream nextPutBlock:[:something | self nextPut:something]. |
|
160 |
entryStream nextPutAllBlock:[:something | self nextPutAll:something] |
|
161 |
! |
|
162 |
||
59 | 163 |
initializeMiddleButtonMenu |
164 |
|idx| |
|
165 |
||
166 |
super initializeMiddleButtonMenu. |
|
167 |
||
168 |
" |
|
169 |
textcollectors do not support #accept |
|
170 |
remove it from the menu (and the preceeding separating line) |
|
171 |
" |
|
172 |
idx := middleButtonMenu indexOf:#accept. |
|
173 |
idx ~~ 0 ifTrue:[ |
|
174 |
middleButtonMenu remove:idx. |
|
175 |
(middleButtonMenu labels at:(idx - 1)) = '-' ifTrue:[ |
|
176 |
middleButtonMenu remove:idx - 1 |
|
177 |
]. |
|
178 |
]. |
|
179 |
! |
|
180 |
||
36 | 181 |
reinitialize |
182 |
"recreate access-semaphore; image could have been save (theoretically) |
|
183 |
with the semaphore locked - int this case, we had a deadlock" |
|
184 |
||
185 |
flushPending := false. |
|
186 |
access := Semaphore forMutualExclusion. |
|
187 |
super reinitialize. |
|
188 |
! |
|
189 |
||
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
190 |
mapped |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
191 |
"view became visible - show collected lines (if any)" |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
192 |
|
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
193 |
super mapped. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
194 |
self endEntry |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
195 |
! |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
196 |
|
0 | 197 |
destroy |
198 |
destroyAction notNil ifTrue:[ |
|
59 | 199 |
destroyAction value |
0 | 200 |
]. |
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
201 |
Processor removeTimedBlock:flushBlock. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
202 |
flushBlock := nil. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
203 |
outstandingLines := OrderedCollection new. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
204 |
outstandingLine := ''. |
0 | 205 |
super destroy |
206 |
! ! |
|
207 |
||
208 |
!TextCollector methodsFor:'accessing'! |
|
209 |
||
210 |
collect:aBoolean |
|
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
211 |
"turn on/off collecting - if on, do not output immediately |
15 | 212 |
but collect text and output en-bloque after some time delta" |
0 | 213 |
|
214 |
collecting := aBoolean |
|
215 |
! |
|
216 |
||
217 |
lineLimit:aNumber |
|
218 |
"define the number of text-lines I am supposed to hold" |
|
219 |
||
220 |
lineLimit := aNumber |
|
221 |
! |
|
222 |
||
223 |
destroyAction:aBlock |
|
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
224 |
"define the action to be performed when I get destroyed. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
225 |
This is a special feature, to allow resetting Transcript to Stderr |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
226 |
when closed. (see TextCollectorclass>>newTranscript)" |
0 | 227 |
|
228 |
destroyAction := aBlock |
|
229 |
! |
|
230 |
||
231 |
endEntry |
|
232 |
"flush collected output" |
|
233 |
||
36 | 234 |
|nLines lines| |
0 | 235 |
|
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
236 |
shown ifFalse:[^ self]. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
237 |
|
15 | 238 |
Processor removeTimedBlock:flushBlock. |
59 | 239 |
flushPending ifFalse:[^ self]. |
15 | 240 |
|
77 | 241 |
access wouldBlock ifTrue:[ |
242 |
Processor activeProcessIsSystemProcess ifTrue:[ |
|
243 |
"/ Stderr nextPutAll:'Blocking in Transcript avoided: ' , aString. |
|
244 |
^ self |
|
245 |
] |
|
246 |
]. |
|
247 |
||
52 | 248 |
access critical:[ |
59 | 249 |
flushPending := false. |
250 |
outstandingLines size ~~ 0 ifTrue:[ |
|
251 |
"insert the bunch of lines - if any" |
|
252 |
lines := outstandingLines. |
|
253 |
outstandingLines := OrderedCollection new. |
|
36 | 254 |
|
59 | 255 |
nLines := lines size. |
256 |
(nLines ~~ 0) ifTrue:[ |
|
257 |
self insertLines:lines withCr:true. |
|
258 |
self withCursorOffDo:[ |
|
259 |
(cursorLine >= (firstLineShown + nFullLinesShown)) ifTrue:[ |
|
260 |
self scrollDown:nLines |
|
261 |
] |
|
262 |
]. |
|
263 |
]. |
|
264 |
]. |
|
265 |
"and the last partial line - if any" |
|
266 |
outstandingLine notNil ifTrue:[ |
|
267 |
self insertStringAtCursor:outstandingLine. |
|
268 |
outstandingLine := ''. |
|
269 |
]. |
|
270 |
self checkLineLimit |
|
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
271 |
] |
0 | 272 |
! ! |
273 |
||
274 |
!TextCollector methodsFor:'private'! |
|
275 |
||
276 |
checkLineLimit |
|
277 |
"this method checks if the text has become too large (> lineLimit) |
|
278 |
and cuts off some lines at the top if so; it must be called whenever lines |
|
279 |
have been added to the bottom" |
|
280 |
||
281 |
|nDel| |
|
282 |
||
283 |
lineLimit notNil ifTrue:[ |
|
59 | 284 |
(cursorLine > lineLimit) ifTrue:[ |
285 |
nDel := list size - lineLimit. |
|
286 |
list removeFromIndex:1 toIndex:nDel. |
|
287 |
cursorLine := cursorLine - nDel. |
|
288 |
firstLineShown := firstLineShown - nDel. |
|
289 |
(firstLineShown < 1) ifTrue:[ |
|
290 |
cursorLine := cursorLine - firstLineShown + 1. |
|
291 |
firstLineShown := 1 |
|
292 |
]. |
|
293 |
self contentsChanged |
|
294 |
] |
|
0 | 295 |
] |
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
296 |
! |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
297 |
|
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
298 |
installDelayedUpdate |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
299 |
"arrange for collecting input for some time, |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
300 |
and output all buffered strings at once after a while. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
301 |
This makes output to the transcript much faster on systems |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
302 |
with poor scrolling performance (i.e. dump vga cards ...)." |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
303 |
|
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
304 |
|wg p| |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
305 |
|
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
306 |
flushPending ifFalse:[ |
59 | 307 |
flushPending := true. |
308 |
" |
|
309 |
we could run under a process, which dies in the meantime; |
|
310 |
therefore, we have to arrange for the transcript process to |
|
311 |
be interrupted and do the update. |
|
312 |
" |
|
313 |
wg := self windowGroup. |
|
314 |
wg isNil ifTrue:[ |
|
315 |
p := Processor activeProcess |
|
316 |
] ifFalse:[ |
|
317 |
p := wg process |
|
318 |
]. |
|
319 |
Processor addTimedBlock:flushBlock for:p afterSeconds:timeDelay. |
|
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
320 |
] |
0 | 321 |
! ! |
322 |
||
323 |
!TextCollector methodsFor:'stream messages'! |
|
324 |
||
325 |
lineLength |
|
326 |
^ width // (font width) |
|
327 |
! |
|
328 |
||
329 |
nextPut:something |
|
330 |
"this allows TextCollectors to be used Stream-wise" |
|
331 |
||
332 |
flushPending ifTrue:[ |
|
59 | 333 |
self endEntry |
0 | 334 |
]. |
335 |
(something isMemberOf:Character) ifTrue:[ |
|
59 | 336 |
((something == Character cr) or:[something == Character nl]) ifTrue:[ |
337 |
^ self cr |
|
338 |
]. |
|
339 |
self insertCharAtCursor:something |
|
0 | 340 |
] ifFalse:[ |
59 | 341 |
self insertStringAtCursor:(something printString). |
342 |
self checkLineLimit |
|
0 | 343 |
]. |
344 |
device synchronizeOutput |
|
345 |
! |
|
346 |
||
347 |
nextPutAll:something |
|
348 |
"this allows TextCollectors to be used Stream-wise" |
|
349 |
||
350 |
^ self nextPut:something |
|
351 |
! |
|
352 |
||
353 |
cr |
|
15 | 354 |
"output a carriage return, finishing the current line" |
355 |
||
77 | 356 |
access wouldBlock ifTrue:[ |
357 |
Processor activeProcessIsSystemProcess ifTrue:[ |
|
358 |
Stderr cr. |
|
359 |
^ self |
|
360 |
] |
|
361 |
]. |
|
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
362 |
|
0 | 363 |
collecting ifTrue:[ |
59 | 364 |
access critical:[ |
365 |
outstandingLine notNil ifTrue:[ |
|
366 |
outstandingLines add:outstandingLine. |
|
367 |
]. |
|
368 |
outstandingLine := ''. |
|
369 |
]. |
|
370 |
flushPending ifFalse:[ |
|
371 |
self installDelayedUpdate |
|
372 |
] |
|
0 | 373 |
] ifFalse:[ |
59 | 374 |
access critical:[ |
375 |
self cursorReturn. |
|
376 |
self checkLineLimit. |
|
377 |
]. |
|
0 | 378 |
] |
379 |
! |
|
380 |
||
381 |
show:anObject |
|
382 |
"insert the argument aString at current cursor position" |
|
383 |
||
77 | 384 |
|aString| |
0 | 385 |
|
386 |
aString := anObject printString. |
|
77 | 387 |
access wouldBlock ifTrue:[ |
388 |
Processor activeProcessIsSystemProcess ifTrue:[ |
|
389 |
Stderr nextPutAll:'Blocking in Transcript avoided: ' , aString. |
|
390 |
^ self |
|
391 |
] |
|
392 |
]. |
|
0 | 393 |
collecting ifTrue:[ |
59 | 394 |
access critical:[ |
395 |
outstandingLine notNil ifTrue:[ |
|
396 |
outstandingLine := outstandingLine , aString |
|
397 |
] ifFalse:[ |
|
398 |
outstandingLine := aString |
|
399 |
]. |
|
400 |
]. |
|
401 |
flushPending ifFalse:[ |
|
402 |
self installDelayedUpdate |
|
403 |
] |
|
0 | 404 |
] ifFalse:[ |
59 | 405 |
access critical:[ |
406 |
self nextPut:aString. |
|
407 |
]. |
|
0 | 408 |
] |
409 |
! |
|
410 |
||
411 |
showCr:aString |
|
412 |
"insert the argument aString followed by a newline |
|
413 |
at current cursor position" |
|
414 |
||
415 |
self show:aString. |
|
416 |
self cr |
|
417 |
! |
|
418 |
||
419 |
doesNotUnderstand:aMessage |
|
420 |
"this is funny: all message we do not understand, are passed |
|
421 |
on to the stream which will send the characters via nextPut: |
|
422 |
This way, we understand all Stream messages - great isn't it !! |
|
423 |
" |
|
15 | 424 |
^ entryStream perform:(aMessage selector) withArguments:(aMessage arguments) |
0 | 425 |
! ! |