author | claus |
Thu, 03 Aug 1995 03:35:39 +0200 | |
changeset 135 | e302b73d9439 |
parent 133 | e58c7c979f33 |
child 145 | 6a191e0606e5 |
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 |
119 | 16 |
flushBlock flushPending inFlush 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 |
|
135 | 26 |
$Header: /cvs/stx/stx/libwidg/TextCollector.st,v 1.21 1995-08-03 01:35:39 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 |
" |
135 | 47 |
$Header: /cvs/stx/stx/libwidg/TextCollector.st,v 1.21 1995-08-03 01:35:39 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 |
110 | 57 |
things like trace-windows, errorLogs 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 |
|
110 | 71 |
StyleSheet paramters (transcript only): |
77 | 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 |
|
110 | 104 |
"create and open a new transcript." |
105 |
||
130 | 106 |
|topView transcript f v lines cols| |
0 | 107 |
|
7 | 108 |
topView := StandardSystemView label:'Transcript' minExtent:(100 @ 100). |
0 | 109 |
|
60 | 110 |
v := HVScrollableView for:self miniScrollerH:true miniScrollerV:false in:topView. |
0 | 111 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
112 |
transcript := v scrolledView. |
|
113 |
"transcript partialLines:false." |
|
114 |
||
115 |
f := transcript font. |
|
60 | 116 |
|
117 |
" |
|
118 |
should add the height of the frame & scrollbars to be exact ... |
|
119 |
" |
|
120 |
cols := self defaultTranscriptSize x. |
|
121 |
lines := self defaultTranscriptSize y. |
|
122 |
topView extent:(((f widthOf:'x') * cols) @ (f height * lines)). |
|
0 | 123 |
|
110 | 124 |
transcript beTranscript. |
59 | 125 |
|
80 | 126 |
" |
127 |
run it at a slightly higher prio, to allow for |
|
128 |
delayed buffered updates to be performed |
|
129 |
" |
|
130 |
topView openWithPriority:(Processor userSchedulingPriority + 1). |
|
15 | 131 |
|
0 | 132 |
^ transcript |
110 | 133 |
|
134 |
" |
|
135 |
TextCollector newTranscript |
|
136 |
" |
|
0 | 137 |
! ! |
138 |
||
139 |
!TextCollector methodsFor:'initialize / release'! |
|
140 |
||
141 |
initialize |
|
142 |
super initialize. |
|
143 |
||
144 |
outstandingLines := OrderedCollection new. |
|
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
145 |
|
0 | 146 |
flushBlock := [self endEntry]. |
119 | 147 |
flushPending := inFlush := false. |
15 | 148 |
collecting := true. |
149 |
timeDelay := self class defaultTimeDelay. |
|
119 | 150 |
access := RecursionLock new. "/ Semaphore forMutualExclusion. |
0 | 151 |
|
152 |
lineLimit := self class defaultLineLimit. |
|
153 |
entryStream := ActorStream new. |
|
154 |
entryStream nextPutBlock:[:something | self nextPut:something]. |
|
155 |
entryStream nextPutAllBlock:[:something | self nextPutAll:something] |
|
156 |
! |
|
157 |
||
97 | 158 |
editMenu |
159 |
|m idx| |
|
59 | 160 |
|
97 | 161 |
m := super editMenu. |
59 | 162 |
|
163 |
" |
|
164 |
textcollectors do not support #accept |
|
165 |
remove it from the menu (and the preceeding separating line) |
|
166 |
" |
|
97 | 167 |
idx := m indexOf:#accept. |
59 | 168 |
idx ~~ 0 ifTrue:[ |
97 | 169 |
m remove:idx. |
170 |
(m labels at:(idx - 1)) = '-' ifTrue:[ |
|
171 |
m remove:idx - 1 |
|
59 | 172 |
]. |
173 |
]. |
|
97 | 174 |
^ m |
59 | 175 |
! |
176 |
||
36 | 177 |
reinitialize |
178 |
"recreate access-semaphore; image could have been save (theoretically) |
|
179 |
with the semaphore locked - int this case, we had a deadlock" |
|
180 |
||
181 |
flushPending := false. |
|
119 | 182 |
access := RecursionLock new. "/ Semaphore forMutualExclusion. |
36 | 183 |
super reinitialize. |
184 |
! |
|
185 |
||
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
186 |
mapped |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
187 |
"view became visible - show collected lines (if any)" |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
188 |
|
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
189 |
super mapped. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
190 |
self endEntry |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
191 |
! |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
192 |
|
0 | 193 |
destroy |
194 |
destroyAction notNil ifTrue:[ |
|
59 | 195 |
destroyAction value |
0 | 196 |
]. |
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
197 |
Processor removeTimedBlock:flushBlock. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
198 |
flushBlock := nil. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
199 |
outstandingLines := OrderedCollection new. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
200 |
outstandingLine := ''. |
0 | 201 |
super destroy |
202 |
! ! |
|
203 |
||
110 | 204 |
!TextCollector methodsFor:'transcript specials'! |
205 |
||
206 |
beTranscript |
|
207 |
|fg bg cFg cBg| |
|
208 |
||
209 |
Smalltalk at:#Transcript put:self. |
|
210 |
||
211 |
" |
|
212 |
fancy feature: whenever Transcript is closed, reset to StdError |
|
213 |
" |
|
214 |
self destroyAction:[Smalltalk at:#Transcript put:Stderr]. |
|
215 |
||
130 | 216 |
fg := styleSheet colorAt:'transcriptForegroundColor' default:self foregroundColor. |
217 |
bg := styleSheet colorAt:'transcriptBackgroundColor' default:self backgroundColor. |
|
110 | 218 |
self foregroundColor:fg backgroundColor:bg. |
219 |
self viewBackground:bg. |
|
220 |
||
130 | 221 |
cFg := styleSheet colorAt:'transcriptCursorForegroundColor' default:bg. |
222 |
cBg := styleSheet colorAt:'transcriptCursorBackgroundColor' default:fg. |
|
110 | 223 |
self cursorForegroundColor:cFg backgroundColor:cBg. |
224 |
||
225 |
"self lineLimit:1000. " "or whatever you think makes sense" |
|
226 |
! ! |
|
227 |
||
0 | 228 |
!TextCollector methodsFor:'accessing'! |
229 |
||
230 |
collect:aBoolean |
|
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
231 |
"turn on/off collecting - if on, do not output immediately |
15 | 232 |
but collect text and output en-bloque after some time delta" |
0 | 233 |
|
234 |
collecting := aBoolean |
|
235 |
! |
|
236 |
||
237 |
lineLimit:aNumber |
|
238 |
"define the number of text-lines I am supposed to hold" |
|
239 |
||
240 |
lineLimit := aNumber |
|
241 |
! |
|
242 |
||
243 |
destroyAction:aBlock |
|
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
244 |
"define the action to be performed when I get destroyed. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
245 |
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
|
246 |
when closed. (see TextCollectorclass>>newTranscript)" |
0 | 247 |
|
248 |
destroyAction := aBlock |
|
249 |
! |
|
250 |
||
251 |
endEntry |
|
252 |
"flush collected output" |
|
253 |
||
36 | 254 |
|nLines lines| |
0 | 255 |
|
133 | 256 |
shown ifFalse:[ |
257 |
flushPending ifFalse:[ |
|
258 |
self installDelayedUpdate. |
|
259 |
]. |
|
260 |
^ self |
|
261 |
]. |
|
119 | 262 |
inFlush ifTrue:[^ self]. |
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
263 |
|
15 | 264 |
Processor removeTimedBlock:flushBlock. |
59 | 265 |
flushPending ifFalse:[^ self]. |
15 | 266 |
|
52 | 267 |
access critical:[ |
119 | 268 |
inFlush := true. |
59 | 269 |
flushPending := false. |
270 |
outstandingLines size ~~ 0 ifTrue:[ |
|
271 |
"insert the bunch of lines - if any" |
|
272 |
lines := outstandingLines. |
|
273 |
outstandingLines := OrderedCollection new. |
|
36 | 274 |
|
59 | 275 |
nLines := lines size. |
276 |
(nLines ~~ 0) ifTrue:[ |
|
277 |
self insertLines:lines withCr:true. |
|
131 | 278 |
self cursorToEnd. |
59 | 279 |
self withCursorOffDo:[ |
280 |
(cursorLine >= (firstLineShown + nFullLinesShown)) ifTrue:[ |
|
281 |
self scrollDown:nLines |
|
282 |
] |
|
283 |
]. |
|
284 |
]. |
|
285 |
]. |
|
286 |
"and the last partial line - if any" |
|
287 |
outstandingLine notNil ifTrue:[ |
|
288 |
self insertStringAtCursor:outstandingLine. |
|
289 |
outstandingLine := ''. |
|
290 |
]. |
|
119 | 291 |
self checkLineLimit. |
292 |
inFlush := false. |
|
293 |
]. |
|
294 |
flushPending ifTrue:[ |
|
295 |
flushPending := false. |
|
296 |
self installDelayedUpdate |
|
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
297 |
] |
0 | 298 |
! ! |
299 |
||
300 |
!TextCollector methodsFor:'private'! |
|
301 |
||
302 |
checkLineLimit |
|
303 |
"this method checks if the text has become too large (> lineLimit) |
|
304 |
and cuts off some lines at the top if so; it must be called whenever lines |
|
305 |
have been added to the bottom" |
|
306 |
||
307 |
|nDel| |
|
308 |
||
309 |
lineLimit notNil ifTrue:[ |
|
59 | 310 |
(cursorLine > lineLimit) ifTrue:[ |
311 |
nDel := list size - lineLimit. |
|
312 |
list removeFromIndex:1 toIndex:nDel. |
|
313 |
cursorLine := cursorLine - nDel. |
|
314 |
firstLineShown := firstLineShown - nDel. |
|
315 |
(firstLineShown < 1) ifTrue:[ |
|
316 |
cursorLine := cursorLine - firstLineShown + 1. |
|
317 |
firstLineShown := 1 |
|
318 |
]. |
|
319 |
self contentsChanged |
|
320 |
] |
|
0 | 321 |
] |
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
322 |
! |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
323 |
|
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
324 |
installDelayedUpdate |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
325 |
"arrange for collecting input for some time, |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
326 |
and output all buffered strings at once after a while. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
327 |
This makes output to the transcript much faster on systems |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
328 |
with poor scrolling performance (i.e. dump vga cards ...)." |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
329 |
|
131 | 330 |
|p| |
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
331 |
|
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
332 |
flushPending ifFalse:[ |
59 | 333 |
flushPending := true. |
119 | 334 |
inFlush ifFalse:[ |
335 |
" |
|
336 |
we could run under a process, which dies in the meantime; |
|
337 |
therefore, we have to arrange for the transcript process to |
|
338 |
be interrupted and do the update. |
|
339 |
" |
|
131 | 340 |
windowGroup isNil ifTrue:[ |
119 | 341 |
p := Processor activeProcess |
342 |
] ifFalse:[ |
|
131 | 343 |
p := windowGroup process |
119 | 344 |
]. |
345 |
Processor addTimedBlock:flushBlock for:p afterSeconds:timeDelay. |
|
346 |
] |
|
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
347 |
] |
0 | 348 |
! ! |
349 |
||
135 | 350 |
!TextCollector methodsFor:'events'! |
351 |
||
352 |
exposeX:x y:y width:w height:h |
|
353 |
"flush buffered text when exposed" |
|
354 |
||
355 |
super exposeX:x y:y width:w height:h. |
|
356 |
self endEntry |
|
357 |
! ! |
|
358 |
||
0 | 359 |
!TextCollector methodsFor:'stream messages'! |
360 |
||
361 |
lineLength |
|
362 |
^ width // (font width) |
|
363 |
! |
|
364 |
||
365 |
nextPut:something |
|
366 |
"this allows TextCollectors to be used Stream-wise" |
|
367 |
||
368 |
flushPending ifTrue:[ |
|
59 | 369 |
self endEntry |
0 | 370 |
]. |
371 |
(something isMemberOf:Character) ifTrue:[ |
|
59 | 372 |
((something == Character cr) or:[something == Character nl]) ifTrue:[ |
373 |
^ self cr |
|
374 |
]. |
|
375 |
self insertCharAtCursor:something |
|
0 | 376 |
] ifFalse:[ |
59 | 377 |
self insertStringAtCursor:(something printString). |
378 |
self checkLineLimit |
|
0 | 379 |
]. |
380 |
device synchronizeOutput |
|
381 |
! |
|
382 |
||
383 |
nextPutAll:something |
|
384 |
"this allows TextCollectors to be used Stream-wise" |
|
385 |
||
386 |
^ self nextPut:something |
|
387 |
! |
|
388 |
||
389 |
cr |
|
15 | 390 |
"output a carriage return, finishing the current line" |
391 |
||
131 | 392 |
access critical:[ |
393 |
collecting ifTrue:[ |
|
59 | 394 |
outstandingLine notNil ifTrue:[ |
395 |
outstandingLines add:outstandingLine. |
|
396 |
]. |
|
397 |
outstandingLine := ''. |
|
131 | 398 |
|
399 |
flushPending ifFalse:[ |
|
400 |
self installDelayedUpdate |
|
401 |
] |
|
402 |
] ifFalse:[ |
|
59 | 403 |
self cursorReturn. |
404 |
self checkLineLimit. |
|
131 | 405 |
self cursorToEnd. |
59 | 406 |
]. |
0 | 407 |
] |
408 |
! |
|
409 |
||
410 |
show:anObject |
|
411 |
"insert the argument aString at current cursor position" |
|
412 |
||
77 | 413 |
|aString| |
0 | 414 |
|
415 |
aString := anObject printString. |
|
416 |
collecting ifTrue:[ |
|
59 | 417 |
access critical:[ |
418 |
outstandingLine notNil ifTrue:[ |
|
419 |
outstandingLine := outstandingLine , aString |
|
420 |
] ifFalse:[ |
|
421 |
outstandingLine := aString |
|
422 |
]. |
|
423 |
]. |
|
424 |
flushPending ifFalse:[ |
|
425 |
self installDelayedUpdate |
|
426 |
] |
|
0 | 427 |
] ifFalse:[ |
59 | 428 |
access critical:[ |
429 |
self nextPut:aString. |
|
430 |
]. |
|
0 | 431 |
] |
432 |
! |
|
433 |
||
434 |
showCr:aString |
|
435 |
"insert the argument aString followed by a newline |
|
436 |
at current cursor position" |
|
437 |
||
438 |
self show:aString. |
|
439 |
self cr |
|
440 |
! |
|
441 |
||
442 |
doesNotUnderstand:aMessage |
|
443 |
"this is funny: all message we do not understand, are passed |
|
444 |
on to the stream which will send the characters via nextPut: |
|
445 |
This way, we understand all Stream messages - great isn't it !! |
|
446 |
" |
|
15 | 447 |
^ entryStream perform:(aMessage selector) withArguments:(aMessage arguments) |
0 | 448 |
! ! |