author | Claus Gittinger <cg@exept.de> |
Sat, 24 Mar 2012 20:04:56 +0100 | |
changeset 4411 | 24a09ea995e2 |
parent 4410 | e164f4c1fda4 |
child 4428 | 641c1d7198cf |
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 |
" |
|
2259 | 12 |
"{ Package: 'stx:libwidg' }" |
13 |
||
0 | 14 |
EditTextView subclass:#TextCollector |
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
15 |
instanceVariableNames:'entryStream lineLimit destroyAction outstandingLines |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
16 |
outstandingLine flushBlock flushPending inFlush collecting |
3710 | 17 |
timeDelay access currentEmphasis alwaysAppendAtEnd collectSize |
18 |
autoRaise' |
|
4365 | 19 |
classVariableNames:'TranscriptQuerySignal DebugSendersOfMessagePattern |
20 |
TraceSendersOfMessagePattern' |
|
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
21 |
poolDictionaries:'' |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
22 |
category:'Views-Text' |
0 | 23 |
! |
24 |
||
928 | 25 |
!TextCollector class methodsFor:'documentation'! |
15 | 26 |
|
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
27 |
copyright |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
28 |
" |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
29 |
COPYRIGHT (c) 1989 by Claus Gittinger |
59 | 30 |
All Rights Reserved |
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
31 |
|
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
32 |
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
|
33 |
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
|
34 |
inclusion of the above copyright notice. This software may not |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
35 |
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
|
36 |
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
|
37 |
hereby transferred. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
38 |
" |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
39 |
! |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
40 |
|
15 | 41 |
documentation |
42 |
" |
|
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
43 |
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
|
44 |
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
|
45 |
received text. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
46 |
Its main use in the system is the Transcript, but it can also be used for |
110 | 47 |
things like trace-windows, errorLogs etc. |
0 | 48 |
|
60 | 49 |
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
|
50 |
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
|
51 |
data - finally updating the whole chunk in one piece. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
52 |
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
|
53 |
(on fast displays this is less of a problem). |
15 | 54 |
|
60 | 55 |
The total number of lines kept is controlled by lineLimit, if more lines |
56 |
than this limit are added at the bottom, the textcollector will forget lines |
|
57 |
at the top. |
|
58 |
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
|
59 |
of memory then ... |
77 | 60 |
|
586 | 61 |
[StyleSheet paramters (transcript only):] |
62 |
||
63 |
transcriptForegroundColor defaults to textForegroundColor |
|
64 |
transcriptBackgroundColor' defaults to textBackgroundColor. |
|
77 | 65 |
|
586 | 66 |
transcriptCursorForegroundColor |
67 |
transcriptCursorBackgroundColor |
|
77 | 68 |
|
586 | 69 |
[author:] |
70 |
Claus Gittinger |
|
71 |
||
72 |
[see also:] |
|
73 |
CodeView EditTextView |
|
74 |
ActorStream |
|
15 | 75 |
" |
76 |
! ! |
|
0 | 77 |
|
928 | 78 |
!TextCollector class methodsFor:'instance creation'! |
0 | 79 |
|
2025
0c9729befabc
allow current transcript to be reassigned temporarily
Claus Gittinger <cg@exept.de>
parents:
2024
diff
changeset
|
80 |
initialize |
0c9729befabc
allow current transcript to be reassigned temporarily
Claus Gittinger <cg@exept.de>
parents:
2024
diff
changeset
|
81 |
TranscriptQuerySignal := QuerySignal new. |
0c9729befabc
allow current transcript to be reassigned temporarily
Claus Gittinger <cg@exept.de>
parents:
2024
diff
changeset
|
82 |
|
0c9729befabc
allow current transcript to be reassigned temporarily
Claus Gittinger <cg@exept.de>
parents:
2024
diff
changeset
|
83 |
! |
0c9729befabc
allow current transcript to be reassigned temporarily
Claus Gittinger <cg@exept.de>
parents:
2024
diff
changeset
|
84 |
|
0 | 85 |
newTranscript |
778
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
86 |
"create and open a new transcript. |
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
87 |
This is a leftOver method from times were the Launcher & Transcript |
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
88 |
were two different views. It is no longer recommended." |
110 | 89 |
|
3852
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
90 |
^ self newTranscript:#Transcript |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
91 |
|
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
92 |
" |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
93 |
TextCollector newTranscript. |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
94 |
Transcript lineLimit:3000. |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
95 |
" |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
96 |
|
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
97 |
"Modified: 17.2.1997 / 18:20:27 / cg" |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
98 |
! |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
99 |
|
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
100 |
newTranscript:name |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
101 |
"create and open a new transcript. |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
102 |
This is a leftOver method from times were the Launcher & Transcript |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
103 |
were two different views. It is no longer recommended." |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
104 |
|
1900
d334ab9d32d5
removed minExtent - let topView decide.
Claus Gittinger <cg@exept.de>
parents:
1822
diff
changeset
|
105 |
|topView transcript defSz f v lines cols| |
0 | 106 |
|
3852
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
107 |
topView := StandardSystemView label:name "minExtent:(100 @ 100)". |
0 | 108 |
|
60 | 109 |
v := HVScrollableView for:self miniScrollerH:true miniScrollerV:false in:topView. |
0 | 110 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
111 |
transcript := v scrolledView. |
|
112 |
"transcript partialLines:false." |
|
113 |
||
114 |
f := transcript font. |
|
60 | 115 |
|
116 |
" |
|
117 |
should add the height of the frame & scrollbars to be exact ... |
|
118 |
" |
|
1900
d334ab9d32d5
removed minExtent - let topView decide.
Claus Gittinger <cg@exept.de>
parents:
1822
diff
changeset
|
119 |
defSz := self defaultTranscriptSize. |
d334ab9d32d5
removed minExtent - let topView decide.
Claus Gittinger <cg@exept.de>
parents:
1822
diff
changeset
|
120 |
cols := defSz x. |
d334ab9d32d5
removed minExtent - let topView decide.
Claus Gittinger <cg@exept.de>
parents:
1822
diff
changeset
|
121 |
lines := defSz y. |
60 | 122 |
topView extent:(((f widthOf:'x') * cols) @ (f height * lines)). |
0 | 123 |
|
3852
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
124 |
transcript beTranscript:name. |
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 |
" |
|
3852
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
135 |
TextCollector newTranscript:#T2. |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
136 |
T2 showCR:'Hello world'. |
110 | 137 |
" |
778
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
138 |
|
1026 | 139 |
"Modified: 17.2.1997 / 18:20:27 / cg" |
0 | 140 |
! ! |
141 |
||
2025
0c9729befabc
allow current transcript to be reassigned temporarily
Claus Gittinger <cg@exept.de>
parents:
2024
diff
changeset
|
142 |
!TextCollector class methodsFor:'Signal constants'! |
0c9729befabc
allow current transcript to be reassigned temporarily
Claus Gittinger <cg@exept.de>
parents:
2024
diff
changeset
|
143 |
|
0c9729befabc
allow current transcript to be reassigned temporarily
Claus Gittinger <cg@exept.de>
parents:
2024
diff
changeset
|
144 |
transcriptQuerySignal |
0c9729befabc
allow current transcript to be reassigned temporarily
Claus Gittinger <cg@exept.de>
parents:
2024
diff
changeset
|
145 |
^ TranscriptQuerySignal |
0c9729befabc
allow current transcript to be reassigned temporarily
Claus Gittinger <cg@exept.de>
parents:
2024
diff
changeset
|
146 |
! ! |
0c9729befabc
allow current transcript to be reassigned temporarily
Claus Gittinger <cg@exept.de>
parents:
2024
diff
changeset
|
147 |
|
4105
c2c3a96f8757
debug support: who sends a message
Claus Gittinger <cg@exept.de>
parents:
4073
diff
changeset
|
148 |
!TextCollector class methodsFor:'debugging'! |
c2c3a96f8757
debug support: who sends a message
Claus Gittinger <cg@exept.de>
parents:
4073
diff
changeset
|
149 |
|
4365 | 150 |
debugSendersOfMessagePattern |
151 |
^ DebugSendersOfMessagePattern |
|
152 |
||
153 |
"Created: / 02-02-2012 / 12:05:27 / cg" |
|
154 |
! |
|
155 |
||
4105
c2c3a96f8757
debug support: who sends a message
Claus Gittinger <cg@exept.de>
parents:
4073
diff
changeset
|
156 |
debugSendersOfMessagePattern:aGLOBMatchPattern |
4233
ae8979201707
changed: #debugSendersOfMessagePattern:
Claus Gittinger <cg@exept.de>
parents:
4124
diff
changeset
|
157 |
"ever want to know, who sends a particular text-message to the transcript ? |
4365 | 158 |
Call this with a match string and get a halt, when a matching text is sent to the transcript" |
4105
c2c3a96f8757
debug support: who sends a message
Claus Gittinger <cg@exept.de>
parents:
4073
diff
changeset
|
159 |
|
4365 | 160 |
DebugSendersOfMessagePattern := |
161 |
(aGLOBMatchPattern isEmpty |
|
162 |
ifTrue:[ nil ] |
|
163 |
ifFalse:[ aGLOBMatchPattern ]) |
|
4105
c2c3a96f8757
debug support: who sends a message
Claus Gittinger <cg@exept.de>
parents:
4073
diff
changeset
|
164 |
|
c2c3a96f8757
debug support: who sends a message
Claus Gittinger <cg@exept.de>
parents:
4073
diff
changeset
|
165 |
" |
c2c3a96f8757
debug support: who sends a message
Claus Gittinger <cg@exept.de>
parents:
4073
diff
changeset
|
166 |
self debugSendersOfMessagePattern:'no such*' |
4233
ae8979201707
changed: #debugSendersOfMessagePattern:
Claus Gittinger <cg@exept.de>
parents:
4124
diff
changeset
|
167 |
self debugSendersOfMessagePattern:'remove*' |
4105
c2c3a96f8757
debug support: who sends a message
Claus Gittinger <cg@exept.de>
parents:
4073
diff
changeset
|
168 |
self debugSendersOfMessagePattern:nil. |
4284
3e487b994a8b
changed: #debugSendersOfMessagePattern:
Claus Gittinger <cg@exept.de>
parents:
4233
diff
changeset
|
169 |
self debugSendersOfMessagePattern:'*'. |
4105
c2c3a96f8757
debug support: who sends a message
Claus Gittinger <cg@exept.de>
parents:
4073
diff
changeset
|
170 |
" |
4233
ae8979201707
changed: #debugSendersOfMessagePattern:
Claus Gittinger <cg@exept.de>
parents:
4124
diff
changeset
|
171 |
|
4365 | 172 |
"Modified: / 02-02-2012 / 12:07:11 / cg" |
173 |
! |
|
174 |
||
175 |
traceSendersOfMessagePattern |
|
176 |
^ TraceSendersOfMessagePattern |
|
177 |
||
178 |
"Created: / 02-02-2012 / 12:05:32 / cg" |
|
179 |
! |
|
180 |
||
181 |
traceSendersOfMessagePattern:aGLOBMatchPattern |
|
182 |
"ever want to know, who sends a particular text-message to the transcript ? |
|
183 |
Call this with a match string and get a trace, when a matching text is sent to the transcript" |
|
184 |
||
185 |
TraceSendersOfMessagePattern := |
|
186 |
(aGLOBMatchPattern isEmpty |
|
187 |
ifTrue:[ nil ] |
|
188 |
ifFalse:[ aGLOBMatchPattern ]) |
|
189 |
||
190 |
" |
|
191 |
self traceSendersOfMessagePattern:'removed unreached*' |
|
192 |
self traceSendersOfMessagePattern:nil. |
|
193 |
self traceSendersOfMessagePattern:'*'. |
|
194 |
" |
|
195 |
||
196 |
"Created: / 02-02-2012 / 11:59:22 / cg" |
|
4105
c2c3a96f8757
debug support: who sends a message
Claus Gittinger <cg@exept.de>
parents:
4073
diff
changeset
|
197 |
! ! |
c2c3a96f8757
debug support: who sends a message
Claus Gittinger <cg@exept.de>
parents:
4073
diff
changeset
|
198 |
|
928 | 199 |
!TextCollector class methodsFor:'defaults'! |
0 | 200 |
|
1610
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
201 |
defaultCollectSize |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
202 |
"the number of lines buffered for delayed update" |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
203 |
|
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
204 |
^ 50 |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
205 |
|
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
206 |
"Modified: / 27.7.1998 / 16:14:51 / cg" |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
207 |
! |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
208 |
|
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
209 |
defaultLineLimit |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
210 |
"the number of lines remembered by default" |
59 | 211 |
|
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
212 |
^ 600 |
59 | 213 |
! |
214 |
||
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
215 |
defaultTimeDelay |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
216 |
"the time in seconds to wait & collect by default" |
36 | 217 |
|
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
218 |
^ 0.3 |
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
219 |
! |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
220 |
|
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
221 |
defaultTranscriptSize |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
222 |
"the number of cols/lines by which the Transcript should come up" |
110 | 223 |
|
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
224 |
^ 70@11 |
110 | 225 |
! ! |
226 |
||
2744 | 227 |
!TextCollector methodsFor:'Compatibility-ST80'! |
1500 | 228 |
|
229 |
deselect |
|
230 |
self unselect |
|
1504
3101f410e230
rudimentary support for (some) emphasis messages
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
231 |
! |
3101f410e230
rudimentary support for (some) emphasis messages
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
232 |
|
3101f410e230
rudimentary support for (some) emphasis messages
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
233 |
flush |
3101f410e230
rudimentary support for (some) emphasis messages
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
234 |
self endEntry. |
3101f410e230
rudimentary support for (some) emphasis messages
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
235 |
super flush |
1500 | 236 |
! ! |
237 |
||
0 | 238 |
!TextCollector methodsFor:'accessing'! |
239 |
||
3710 | 240 |
autoRaise |
241 |
^ autoRaise ? false |
|
242 |
! |
|
243 |
||
244 |
autoRaise:something |
|
245 |
autoRaise := something. |
|
246 |
! |
|
247 |
||
1467
5c09bb2dadef
Add (dummy fore now) #beginEntry for ST80 compat.
Stefan Vogel <sv@exept.de>
parents:
1421
diff
changeset
|
248 |
beginEntry |
5c09bb2dadef
Add (dummy fore now) #beginEntry for ST80 compat.
Stefan Vogel <sv@exept.de>
parents:
1421
diff
changeset
|
249 |
"noop for now, ST80 compatibility" |
5c09bb2dadef
Add (dummy fore now) #beginEntry for ST80 compat.
Stefan Vogel <sv@exept.de>
parents:
1421
diff
changeset
|
250 |
|
5c09bb2dadef
Add (dummy fore now) #beginEntry for ST80 compat.
Stefan Vogel <sv@exept.de>
parents:
1421
diff
changeset
|
251 |
^ self |
5c09bb2dadef
Add (dummy fore now) #beginEntry for ST80 compat.
Stefan Vogel <sv@exept.de>
parents:
1421
diff
changeset
|
252 |
|
5c09bb2dadef
Add (dummy fore now) #beginEntry for ST80 compat.
Stefan Vogel <sv@exept.de>
parents:
1421
diff
changeset
|
253 |
"Created: / 4.3.1998 / 11:08:14 / stefan" |
5c09bb2dadef
Add (dummy fore now) #beginEntry for ST80 compat.
Stefan Vogel <sv@exept.de>
parents:
1421
diff
changeset
|
254 |
! |
5c09bb2dadef
Add (dummy fore now) #beginEntry for ST80 compat.
Stefan Vogel <sv@exept.de>
parents:
1421
diff
changeset
|
255 |
|
0 | 256 |
collect:aBoolean |
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
257 |
"turn on/off collecting - if on, do not output immediately |
15 | 258 |
but collect text and output en-bloque after some time delta" |
0 | 259 |
|
260 |
collecting := aBoolean |
|
261 |
! |
|
262 |
||
1610
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
263 |
collectSize:numberOfLines |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
264 |
"set the collect buffer size. If collect is enabled, |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
265 |
the receiver will force update of the view, |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
266 |
whenever that many lines have been collected |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
267 |
(or the updateTimeDelay interval has passed). |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
268 |
With collect turned off, an immediate update is performed." |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
269 |
|
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
270 |
collectSize := numberOfLines |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
271 |
|
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
272 |
"Modified: / 27.7.1998 / 16:16:00 / cg" |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
273 |
! |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
274 |
|
0 | 275 |
destroyAction:aBlock |
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
276 |
"define the action to be performed when I get destroyed. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
277 |
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
|
278 |
when closed. (see TextCollectorclass>>newTranscript)" |
0 | 279 |
|
280 |
destroyAction := aBlock |
|
281 |
! |
|
282 |
||
283 |
endEntry |
|
928 | 284 |
"flush collected output; displaying all that has been buffered so far" |
0 | 285 |
|
36 | 286 |
|nLines lines| |
0 | 287 |
|
133 | 288 |
shown ifFalse:[ |
1971 | 289 |
"/ when iconified or not yet shown, keep |
290 |
"/ collecting. But not too much ... |
|
291 |
outstandingLines size < 300 ifTrue:[ |
|
292 |
flushPending ifFalse:[ |
|
293 |
self installDelayedUpdate. |
|
294 |
]. |
|
295 |
^ self |
|
296 |
] |
|
133 | 297 |
]. |
1971 | 298 |
|
119 | 299 |
inFlush ifTrue:[^ self]. |
2831 | 300 |
collecting ifTrue:[ |
301 |
flushBlock notNil ifTrue:[ |
|
302 |
Processor removeTimedBlock:flushBlock. |
|
303 |
]. |
|
304 |
flushPending ifFalse:[^ self]. |
|
1714 | 305 |
]. |
15 | 306 |
|
52 | 307 |
access critical:[ |
653 | 308 |
inFlush := true. |
1491
0445841f7852
care for unwind (clear inFlush flag)
Claus Gittinger <cg@exept.de>
parents:
1489
diff
changeset
|
309 |
[ |
0445841f7852
care for unwind (clear inFlush flag)
Claus Gittinger <cg@exept.de>
parents:
1489
diff
changeset
|
310 |
flushPending := false. |
0445841f7852
care for unwind (clear inFlush flag)
Claus Gittinger <cg@exept.de>
parents:
1489
diff
changeset
|
311 |
outstandingLines size ~~ 0 ifTrue:[ |
0445841f7852
care for unwind (clear inFlush flag)
Claus Gittinger <cg@exept.de>
parents:
1489
diff
changeset
|
312 |
"insert the bunch of lines - if any" |
0445841f7852
care for unwind (clear inFlush flag)
Claus Gittinger <cg@exept.de>
parents:
1489
diff
changeset
|
313 |
lines := outstandingLines. |
0445841f7852
care for unwind (clear inFlush flag)
Claus Gittinger <cg@exept.de>
parents:
1489
diff
changeset
|
314 |
outstandingLines := nil. |
36 | 315 |
|
1491
0445841f7852
care for unwind (clear inFlush flag)
Claus Gittinger <cg@exept.de>
parents:
1489
diff
changeset
|
316 |
nLines := lines size. |
0445841f7852
care for unwind (clear inFlush flag)
Claus Gittinger <cg@exept.de>
parents:
1489
diff
changeset
|
317 |
(nLines ~~ 0) ifTrue:[ |
3248 | 318 |
self isInInsertMode ifTrue:[ |
1565
9109e9848c6f
care for insertMode when handling collected text.
Claus Gittinger <cg@exept.de>
parents:
1562
diff
changeset
|
319 |
self insertLines:lines withCR:true. |
9109e9848c6f
care for insertMode when handling collected text.
Claus Gittinger <cg@exept.de>
parents:
1562
diff
changeset
|
320 |
] ifFalse:[ |
9109e9848c6f
care for insertMode when handling collected text.
Claus Gittinger <cg@exept.de>
parents:
1562
diff
changeset
|
321 |
self replaceLines:lines withCR:true |
9109e9848c6f
care for insertMode when handling collected text.
Claus Gittinger <cg@exept.de>
parents:
1562
diff
changeset
|
322 |
]. |
1562
9b7557a81849
made the number of buffered lines an instVar.
Claus Gittinger <cg@exept.de>
parents:
1504
diff
changeset
|
323 |
alwaysAppendAtEnd ifTrue:[ |
9b7557a81849
made the number of buffered lines an instVar.
Claus Gittinger <cg@exept.de>
parents:
1504
diff
changeset
|
324 |
self cursorToEnd. |
9b7557a81849
made the number of buffered lines an instVar.
Claus Gittinger <cg@exept.de>
parents:
1504
diff
changeset
|
325 |
]. |
2371 | 326 |
(cursorLine >= (firstLineShown + nFullLinesShown)) ifTrue:[ |
327 |
self withCursorOffDo:[ |
|
1491
0445841f7852
care for unwind (clear inFlush flag)
Claus Gittinger <cg@exept.de>
parents:
1489
diff
changeset
|
328 |
self scrollDown:nLines |
0445841f7852
care for unwind (clear inFlush flag)
Claus Gittinger <cg@exept.de>
parents:
1489
diff
changeset
|
329 |
] |
0445841f7852
care for unwind (clear inFlush flag)
Claus Gittinger <cg@exept.de>
parents:
1489
diff
changeset
|
330 |
]. |
653 | 331 |
]. |
332 |
]. |
|
928 | 333 |
|
1491
0445841f7852
care for unwind (clear inFlush flag)
Claus Gittinger <cg@exept.de>
parents:
1489
diff
changeset
|
334 |
"and the last partial line - if any" |
3295
37cb2b5d579a
Allow for readOnly TextCollectors
Stefan Vogel <sv@exept.de>
parents:
3248
diff
changeset
|
335 |
outstandingLine size ~~ 0 ifTrue:[ |
3248 | 336 |
self isInInsertMode ifTrue:[ |
1565
9109e9848c6f
care for insertMode when handling collected text.
Claus Gittinger <cg@exept.de>
parents:
1562
diff
changeset
|
337 |
self insertStringAtCursor:outstandingLine. |
9109e9848c6f
care for insertMode when handling collected text.
Claus Gittinger <cg@exept.de>
parents:
1562
diff
changeset
|
338 |
] ifFalse:[ |
9109e9848c6f
care for insertMode when handling collected text.
Claus Gittinger <cg@exept.de>
parents:
1562
diff
changeset
|
339 |
self replaceStringAtCursor:outstandingLine. |
9109e9848c6f
care for insertMode when handling collected text.
Claus Gittinger <cg@exept.de>
parents:
1562
diff
changeset
|
340 |
]. |
1491
0445841f7852
care for unwind (clear inFlush flag)
Claus Gittinger <cg@exept.de>
parents:
1489
diff
changeset
|
341 |
outstandingLine := ''. |
0445841f7852
care for unwind (clear inFlush flag)
Claus Gittinger <cg@exept.de>
parents:
1489
diff
changeset
|
342 |
]. |
0445841f7852
care for unwind (clear inFlush flag)
Claus Gittinger <cg@exept.de>
parents:
1489
diff
changeset
|
343 |
self checkLineLimit. |
2632 | 344 |
"/ device flush. |
2520
aed8069b4477
#valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents:
2450
diff
changeset
|
345 |
] ensure:[ |
1491
0445841f7852
care for unwind (clear inFlush flag)
Claus Gittinger <cg@exept.de>
parents:
1489
diff
changeset
|
346 |
inFlush := false. |
0445841f7852
care for unwind (clear inFlush flag)
Claus Gittinger <cg@exept.de>
parents:
1489
diff
changeset
|
347 |
] |
119 | 348 |
]. |
349 |
flushPending ifTrue:[ |
|
653 | 350 |
flushPending := false. |
351 |
self installDelayedUpdate |
|
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
352 |
] |
653 | 353 |
|
1714 | 354 |
"Modified: / 9.11.1998 / 21:17:56 / cg" |
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
355 |
! |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
356 |
|
2103 | 357 |
lineLimit |
358 |
"return the number of text-lines I am supposed to hold" |
|
359 |
||
360 |
^ lineLimit |
|
361 |
||
362 |
" |
|
363 |
Transcript lineLimit:5000 |
|
364 |
Transcript lineLimit |
|
365 |
" |
|
366 |
||
367 |
"Modified: / 16.5.1998 / 01:33:52 / cg" |
|
368 |
! |
|
369 |
||
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
370 |
lineLimit:aNumber |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
371 |
"define the number of text-lines I am supposed to hold" |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
372 |
|
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
373 |
lineLimit := aNumber |
1611 | 374 |
|
375 |
" |
|
376 |
Transcript lineLimit:5000 |
|
377 |
" |
|
378 |
||
379 |
"Modified: / 16.5.1998 / 01:33:52 / cg" |
|
1610
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
380 |
! |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
381 |
|
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
382 |
updateTimeDelay:seconds |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
383 |
"if collect is enabled, the receiver will update its view, |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
384 |
after that time delay (i.e. it collects more output during that period), |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
385 |
or when collectSize lines have been collected without update. |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
386 |
With collect turned off, an immediate update is performed." |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
387 |
|
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
388 |
timeDelay := seconds |
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
389 |
|
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
390 |
"Modified: / 27.7.1998 / 16:16:41 / cg" |
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
391 |
! ! |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
392 |
|
3969
a914bce039b7
category of: #exposeX:y:width:height:
Claus Gittinger <cg@exept.de>
parents:
3958
diff
changeset
|
393 |
!TextCollector methodsFor:'event handling'! |
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
394 |
|
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
395 |
exposeX:x y:y width:w height:h |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
396 |
"flush buffered text when exposed" |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
397 |
|
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
398 |
super exposeX:x y:y width:w height:h. |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
399 |
self endEntry |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
400 |
! ! |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
401 |
|
2750 | 402 |
!TextCollector methodsFor:'initialization & release'! |
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
403 |
|
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
404 |
destroy |
928 | 405 |
"destroy this view" |
406 |
||
3201 | 407 |
destroyAction value. |
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
408 |
super destroy |
928 | 409 |
|
1714 | 410 |
"Modified: / 9.11.1998 / 21:18:17 / cg" |
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
411 |
! |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
412 |
|
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
413 |
editMenu |
928 | 414 |
"return my popUpMenu; thats the superClasses menu, |
415 |
minus any accept item." |
|
416 |
||
1262
d69149b5be1f
resource flag: #menu -> #programMenu
Claus Gittinger <cg@exept.de>
parents:
1221
diff
changeset
|
417 |
<resource: #programMenu> |
1109 | 418 |
|
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
419 |
|m idx| |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
420 |
|
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
421 |
m := super editMenu. |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
422 |
|
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
423 |
" |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
424 |
textcollectors do not support #accept |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
425 |
remove it from the menu (and the preceeding separating line) |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
426 |
" |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
427 |
idx := m indexOf:#accept. |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
428 |
idx ~~ 0 ifTrue:[ |
928 | 429 |
m remove:idx. |
430 |
(m labels at:(idx - 1)) = '-' ifTrue:[ |
|
431 |
m remove:idx - 1 |
|
432 |
]. |
|
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
433 |
]. |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
434 |
^ m |
928 | 435 |
|
1262
d69149b5be1f
resource flag: #menu -> #programMenu
Claus Gittinger <cg@exept.de>
parents:
1221
diff
changeset
|
436 |
"Modified: 3.7.1997 / 13:54:11 / cg" |
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
437 |
! |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
438 |
|
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
439 |
initialize |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
440 |
super initialize. |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
441 |
|
2164
ed46136cb2cf
honor scrollWhenUpdating setting
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
442 |
scrollWhenUpdating := #endOfText. |
ed46136cb2cf
honor scrollWhenUpdating setting
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
443 |
|
928 | 444 |
outstandingLines := nil. |
1562
9b7557a81849
made the number of buffered lines an instVar.
Claus Gittinger <cg@exept.de>
parents:
1504
diff
changeset
|
445 |
alwaysAppendAtEnd := true. |
1610
b05a3e405b33
allow change of collectSize and updateTimeDelay.
Claus Gittinger <cg@exept.de>
parents:
1598
diff
changeset
|
446 |
collectSize := self class defaultCollectSize. |
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
447 |
|
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
448 |
flushPending := inFlush := false. |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
449 |
collecting := true. |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
450 |
timeDelay := self class defaultTimeDelay. |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
451 |
access := RecursionLock new. "/ Semaphore forMutualExclusion. |
2086
95ec18a17198
give my access sema a name (for the semaphoreMonitor)
Claus Gittinger <cg@exept.de>
parents:
2025
diff
changeset
|
452 |
access name:'TextCollector access lock'. |
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
453 |
|
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
454 |
lineLimit := self class defaultLineLimit. |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
455 |
entryStream := ActorStream new. |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
456 |
entryStream nextPutBlock:[:something | self nextPut:something]. |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
457 |
entryStream nextPutAllBlock:[:something | self nextPutAll:something] |
928 | 458 |
|
2086
95ec18a17198
give my access sema a name (for the semaphoreMonitor)
Claus Gittinger <cg@exept.de>
parents:
2025
diff
changeset
|
459 |
"Modified: / 14.12.1999 / 21:13:54 / cg" |
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
460 |
! |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
461 |
|
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
462 |
mapped |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
463 |
"view became visible - show collected lines (if any)" |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
464 |
|
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
465 |
super mapped. |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
466 |
self endEntry |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
467 |
! |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
468 |
|
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
469 |
reinitialize |
2259 | 470 |
"reinit after a snapIn. |
471 |
recreate access-semaphore; image could have been save (theoretically) |
|
1467
5c09bb2dadef
Add (dummy fore now) #beginEntry for ST80 compat.
Stefan Vogel <sv@exept.de>
parents:
1421
diff
changeset
|
472 |
with the semaphore locked - in this case, we had a deadlock" |
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
473 |
|
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
474 |
flushPending := false. |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
475 |
access := RecursionLock new. "/ Semaphore forMutualExclusion. |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
476 |
super reinitialize. |
1467
5c09bb2dadef
Add (dummy fore now) #beginEntry for ST80 compat.
Stefan Vogel <sv@exept.de>
parents:
1421
diff
changeset
|
477 |
|
5c09bb2dadef
Add (dummy fore now) #beginEntry for ST80 compat.
Stefan Vogel <sv@exept.de>
parents:
1421
diff
changeset
|
478 |
"Modified: / 5.3.1998 / 10:09:14 / stefan" |
2591 | 479 |
! |
480 |
||
481 |
release |
|
482 |
flushBlock notNil ifTrue:[ |
|
483 |
Processor removeTimedBlock:flushBlock. |
|
484 |
flushBlock := nil. |
|
485 |
]. |
|
486 |
outstandingLines := nil. |
|
487 |
outstandingLine := ''. |
|
488 |
||
489 |
super release |
|
490 |
||
491 |
"Modified: / 9.11.1998 / 21:18:17 / cg" |
|
0 | 492 |
! ! |
493 |
||
494 |
!TextCollector methodsFor:'private'! |
|
495 |
||
496 |
checkLineLimit |
|
497 |
"this method checks if the text has become too large (> lineLimit) |
|
498 |
and cuts off some lines at the top if so; it must be called whenever lines |
|
499 |
have been added to the bottom" |
|
500 |
||
2426
281067d406c7
eliminated direct write-access to cursorLine
Claus Gittinger <cg@exept.de>
parents:
2371
diff
changeset
|
501 |
|nDel newCursorLine| |
0 | 502 |
|
503 |
lineLimit notNil ifTrue:[ |
|
2426
281067d406c7
eliminated direct write-access to cursorLine
Claus Gittinger <cg@exept.de>
parents:
2371
diff
changeset
|
504 |
(cursorLine > lineLimit) ifTrue:[ |
281067d406c7
eliminated direct write-access to cursorLine
Claus Gittinger <cg@exept.de>
parents:
2371
diff
changeset
|
505 |
nDel := list size - lineLimit. |
281067d406c7
eliminated direct write-access to cursorLine
Claus Gittinger <cg@exept.de>
parents:
2371
diff
changeset
|
506 |
list removeFromIndex:1 toIndex:nDel. |
281067d406c7
eliminated direct write-access to cursorLine
Claus Gittinger <cg@exept.de>
parents:
2371
diff
changeset
|
507 |
newCursorLine := cursorLine - nDel. |
281067d406c7
eliminated direct write-access to cursorLine
Claus Gittinger <cg@exept.de>
parents:
2371
diff
changeset
|
508 |
firstLineShown := firstLineShown - nDel. |
281067d406c7
eliminated direct write-access to cursorLine
Claus Gittinger <cg@exept.de>
parents:
2371
diff
changeset
|
509 |
(firstLineShown < 1) ifTrue:[ |
281067d406c7
eliminated direct write-access to cursorLine
Claus Gittinger <cg@exept.de>
parents:
2371
diff
changeset
|
510 |
newCursorLine := newCursorLine - firstLineShown + 1. |
281067d406c7
eliminated direct write-access to cursorLine
Claus Gittinger <cg@exept.de>
parents:
2371
diff
changeset
|
511 |
firstLineShown := 1 |
281067d406c7
eliminated direct write-access to cursorLine
Claus Gittinger <cg@exept.de>
parents:
2371
diff
changeset
|
512 |
]. |
281067d406c7
eliminated direct write-access to cursorLine
Claus Gittinger <cg@exept.de>
parents:
2371
diff
changeset
|
513 |
self setCursorLine:newCursorLine. |
3320
a820e3101bb6
refresh when removing some lines after hitting linelimit
fm
parents:
3295
diff
changeset
|
514 |
self contentsChanged. |
a820e3101bb6
refresh when removing some lines after hitting linelimit
fm
parents:
3295
diff
changeset
|
515 |
self invalidate. |
2426
281067d406c7
eliminated direct write-access to cursorLine
Claus Gittinger <cg@exept.de>
parents:
2371
diff
changeset
|
516 |
] |
3710 | 517 |
]. |
518 |
self autoRaise ifTrue:[ |
|
519 |
self topView |
|
520 |
raise; |
|
521 |
"/ setForegroundWindow; |
|
522 |
yourself. |
|
523 |
]. |
|
3320
a820e3101bb6
refresh when removing some lines after hitting linelimit
fm
parents:
3295
diff
changeset
|
524 |
|
a820e3101bb6
refresh when removing some lines after hitting linelimit
fm
parents:
3295
diff
changeset
|
525 |
"Modified: / 26-07-2006 / 16:02:15 / fm" |
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
526 |
! |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
527 |
|
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
528 |
installDelayedUpdate |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
529 |
"arrange for collecting input for some time, |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
530 |
and output all buffered strings at once after a while. |
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
531 |
This makes output to the transcript much faster on systems |
553 | 532 |
with poor scrolling performance (i.e. dumb vga cards ...)." |
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
533 |
|
131 | 534 |
|p| |
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
535 |
|
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
536 |
flushPending ifFalse:[ |
553 | 537 |
flushPending := true. |
538 |
inFlush ifFalse:[ |
|
539 |
" |
|
540 |
we could run under a process, which dies in the meantime; |
|
541 |
therefore, we have to arrange for the transcript process to |
|
542 |
be interrupted and do the update. |
|
543 |
" |
|
544 |
windowGroup isNil ifTrue:[ |
|
545 |
p := Processor activeProcess |
|
546 |
] ifFalse:[ |
|
547 |
p := windowGroup process |
|
548 |
]. |
|
1221
0c2a4231fc9e
Move #isSystemProcess from ProcessorScheduler to Process.
Stefan Vogel <sv@exept.de>
parents:
1109
diff
changeset
|
549 |
(p isNil or:[p isSystemProcess]) ifTrue:[ |
834
0da7c9923d1b
prevent scheduler from being suspended
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
550 |
self endEntry |
0da7c9923d1b
prevent scheduler from being suspended
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
551 |
] ifFalse:[ |
1711 | 552 |
flushBlock isNil ifTrue:[ |
553 |
flushBlock := [self endEntry]. |
|
554 |
]. |
|
834
0da7c9923d1b
prevent scheduler from being suspended
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
555 |
Processor addTimedBlock:flushBlock for:p afterSeconds:timeDelay. |
3009
7eb1704fa5a6
Avoid dangling references in context
Stefan Vogel <sv@exept.de>
parents:
3006
diff
changeset
|
556 |
]. |
7eb1704fa5a6
Avoid dangling references in context
Stefan Vogel <sv@exept.de>
parents:
3006
diff
changeset
|
557 |
p := nil. "avoid dangling references to p through the home context of flushBlock" |
553 | 558 |
] |
34
c4b386a8cc57
critical-lock; allows show:/showCr: from multiple processes
claus
parents:
22
diff
changeset
|
559 |
] |
553 | 560 |
|
1711 | 561 |
"Modified: / 17.4.1997 / 13:03:15 / stefan" |
562 |
"Modified: / 9.11.1998 / 14:34:07 / cg" |
|
4365 | 563 |
! |
564 |
||
565 |
senderTraceString |
|
566 |
"generate a sender trace string." |
|
567 |
||
568 |
|con| |
|
569 |
||
570 |
"/ skip over intermediate contexts |
|
571 |
"/ con := con sender. |
|
572 |
"/ con := thisContext sender sender. |
|
573 |
"/ [ con receiver == self ] whileTrue:[ |
|
574 |
"/ con := con sender |
|
575 |
"/ ]. |
|
576 |
con := DebugView interestingContextFrom:thisContext sender sender. |
|
577 |
^ con printString |
|
578 |
||
579 |
"Created: / 02-02-2012 / 11:58:17 / cg" |
|
0 | 580 |
! ! |
581 |
||
778
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
582 |
!TextCollector methodsFor:'queries'! |
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
583 |
|
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
584 |
current |
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
585 |
"return the current (your screens) transcript. |
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
586 |
In multiDisplay applications, this need NOT be the main transcript. |
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
587 |
But typically, this is the same as Transcript." |
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
588 |
|
2278 | 589 |
|theTranscript app| |
2025
0c9729befabc
allow current transcript to be reassigned temporarily
Claus Gittinger <cg@exept.de>
parents:
2024
diff
changeset
|
590 |
|
0c9729befabc
allow current transcript to be reassigned temporarily
Claus Gittinger <cg@exept.de>
parents:
2024
diff
changeset
|
591 |
theTranscript := TranscriptQuerySignal query. |
0c9729befabc
allow current transcript to be reassigned temporarily
Claus Gittinger <cg@exept.de>
parents:
2024
diff
changeset
|
592 |
theTranscript isNil ifTrue:[ |
2278 | 593 |
app := self topView application class current. |
2763
e2fba3262e07
Avoid recursion when getting the Transcript on extra displays
Stefan Vogel <sv@exept.de>
parents:
2750
diff
changeset
|
594 |
(app notNil and:[thisContext isRecursive not]) ifTrue:[ |
2278 | 595 |
theTranscript := (app transcript ? Stderr). |
596 |
] ifFalse:[ |
|
597 |
theTranscript := Stderr. |
|
598 |
] |
|
2025
0c9729befabc
allow current transcript to be reassigned temporarily
Claus Gittinger <cg@exept.de>
parents:
2024
diff
changeset
|
599 |
]. |
0c9729befabc
allow current transcript to be reassigned temporarily
Claus Gittinger <cg@exept.de>
parents:
2024
diff
changeset
|
600 |
^ theTranscript |
778
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
601 |
|
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
602 |
" |
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
603 |
Transcript current flash |
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
604 |
" |
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
605 |
|
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
606 |
"Created: 5.7.1996 / 14:14:34 / cg" |
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
607 |
"Modified: 5.7.1996 / 14:14:52 / cg" |
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
608 |
! ! |
3a8fabcf1872
added #current (for: Transcript current)
Claus Gittinger <cg@exept.de>
parents:
656
diff
changeset
|
609 |
|
2450 | 610 |
!TextCollector methodsFor:'scrolling'! |
611 |
||
612 |
scrollTo:anOrigin redraw:doRedraw |
|
613 |
access critical:[ |
|
614 |
super scrollTo:anOrigin redraw:doRedraw |
|
615 |
] |
|
616 |
! ! |
|
617 |
||
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
618 |
!TextCollector methodsFor:'stream messages'! |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
619 |
|
4106 | 620 |
addLine:line |
621 |
"append a line to the outstanding lines buffer" |
|
622 |
||
623 |
access critical:[ |
|
624 |
outstandingLine size ~~ 0 ifTrue:[ |
|
625 |
outstandingLine := outstandingLine , line |
|
626 |
] ifFalse:[ |
|
627 |
outstandingLine := line |
|
628 |
]. |
|
629 |
outstandingLines isNil ifTrue:[ |
|
630 |
outstandingLines := OrderedCollection with:outstandingLine |
|
631 |
] ifFalse:[ |
|
632 |
outstandingLines add:outstandingLine. |
|
633 |
]. |
|
634 |
outstandingLine := ''. |
|
635 |
||
636 |
collecting ifTrue:[ |
|
637 |
flushPending ifTrue:[ |
|
638 |
outstandingLines size > collectSize ifTrue:[ |
|
639 |
self endEntry |
|
640 |
] |
|
641 |
] ifFalse:[ |
|
642 |
self installDelayedUpdate |
|
643 |
] |
|
644 |
] ifFalse:[ |
|
645 |
self endEntry. |
|
646 |
self cursorReturn. |
|
647 |
self checkLineLimit. |
|
648 |
self cursorToEnd. |
|
649 |
] |
|
650 |
]. |
|
651 |
||
652 |
"Created: / 28.7.1998 / 00:31:46 / cg" |
|
653 |
"Modified: / 28.7.1998 / 00:34:58 / cg" |
|
654 |
! |
|
655 |
||
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
656 |
cr |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
657 |
"output a carriage return, finishing the current line" |
135 | 658 |
|
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
659 |
access critical:[ |
834
0da7c9923d1b
prevent scheduler from being suspended
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
660 |
collecting ifTrue:[ |
928 | 661 |
outstandingLine notNil ifTrue:[ "/ mhmh - is never nil |
662 |
outstandingLines isNil ifTrue:[ |
|
663 |
outstandingLines := OrderedCollection with:outstandingLine |
|
664 |
] ifFalse:[ |
|
665 |
outstandingLines add:outstandingLine. |
|
666 |
] |
|
834
0da7c9923d1b
prevent scheduler from being suspended
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
667 |
]. |
0da7c9923d1b
prevent scheduler from being suspended
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
668 |
outstandingLine := ''. |
0da7c9923d1b
prevent scheduler from being suspended
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
669 |
] ifFalse:[ |
0da7c9923d1b
prevent scheduler from being suspended
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
670 |
self cursorReturn. |
0da7c9923d1b
prevent scheduler from being suspended
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
671 |
self checkLineLimit. |
0da7c9923d1b
prevent scheduler from being suspended
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
672 |
self cursorToEnd. |
0da7c9923d1b
prevent scheduler from being suspended
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
673 |
]. |
0da7c9923d1b
prevent scheduler from being suspended
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
674 |
]. |
135 | 675 |
|
834
0da7c9923d1b
prevent scheduler from being suspended
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
676 |
collecting ifTrue:[ |
0da7c9923d1b
prevent scheduler from being suspended
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
677 |
flushPending ifFalse:[ |
0da7c9923d1b
prevent scheduler from being suspended
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
678 |
self installDelayedUpdate |
0da7c9923d1b
prevent scheduler from being suspended
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
679 |
] |
2831 | 680 |
]. |
834
0da7c9923d1b
prevent scheduler from being suspended
Claus Gittinger <cg@exept.de>
parents:
778
diff
changeset
|
681 |
|
928 | 682 |
"Modified: 11.1.1997 / 14:39:00 / cg" |
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
683 |
! |
135 | 684 |
|
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
685 |
doesNotUnderstand:aMessage |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
686 |
"this is funny: all message we do not understand, are passed |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
687 |
on to the stream which will send the characters via nextPut: |
3006 | 688 |
This way, we understand all Stream messages - great isn't it!!" |
689 |
||
3243 | 690 |
^ aMessage sendTo:entryStream |
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
691 |
! |
0 | 692 |
|
4311 | 693 |
ensureCr |
694 |
"if the output position is not already at the beginning of a line, |
|
695 |
output a carriage return" |
|
696 |
||
697 |
|needCR| |
|
698 |
||
699 |
collecting ifTrue:[ |
|
700 |
needCR := outstandingLine notEmptyOrNil |
|
701 |
] ifFalse:[ |
|
702 |
needCR := cursorCol > 0 |
|
703 |
]. |
|
704 |
||
705 |
needCR ifTrue:[ |
|
706 |
self cr. |
|
707 |
]. |
|
708 |
||
709 |
"Created: / 14-09-2011 / 09:01:03 / cg" |
|
710 |
! |
|
711 |
||
0 | 712 |
lineLength |
928 | 713 |
"to make a textCollector (somewhat) compatible with printer |
714 |
streams, support the lineLength query" |
|
715 |
||
0 | 716 |
^ width // (font width) |
928 | 717 |
|
718 |
"Modified: 11.1.1997 / 14:42:41 / cg" |
|
0 | 719 |
! |
720 |
||
721 |
nextPut:something |
|
928 | 722 |
"append somethings printString to my displayed text. |
723 |
This allows TextCollectors to be used Stream-wise" |
|
0 | 724 |
|
1504
3101f410e230
rudimentary support for (some) emphasis messages
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
725 |
|txt| |
3101f410e230
rudimentary support for (some) emphasis messages
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
726 |
|
656 | 727 |
(something isCharacter) ifTrue:[ |
728 |
((something == Character cr) or:[something == Character nl]) ifTrue:[ |
|
729 |
^ self cr |
|
730 |
]. |
|
0 | 731 |
]. |
1504
3101f410e230
rudimentary support for (some) emphasis messages
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
732 |
|
3101f410e230
rudimentary support for (some) emphasis messages
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
733 |
txt := something asString. |
3101f410e230
rudimentary support for (some) emphasis messages
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
734 |
currentEmphasis notNil ifTrue:[ |
3101f410e230
rudimentary support for (some) emphasis messages
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
735 |
txt := txt emphasizeAllWith:currentEmphasis |
3101f410e230
rudimentary support for (some) emphasis messages
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
736 |
]. |
3101f410e230
rudimentary support for (some) emphasis messages
Claus Gittinger <cg@exept.de>
parents:
1500
diff
changeset
|
737 |
self show:txt. |
656 | 738 |
|
739 |
"/ flushPending ifTrue:[ |
|
740 |
"/ self endEntry |
|
741 |
"/ ]. |
|
742 |
"/ (something isMemberOf:Character) ifTrue:[ |
|
743 |
"/ ((something == Character cr) or:[something == Character nl]) ifTrue:[ |
|
744 |
"/ ^ self cr |
|
745 |
"/ ]. |
|
746 |
"/ self insertCharAtCursor:something |
|
747 |
"/ ] ifFalse:[ |
|
748 |
"/ self insertStringAtCursor:(something printString). |
|
749 |
"/ self checkLineLimit |
|
750 |
"/ ]. |
|
751 |
"/ device flush |
|
752 |
||
928 | 753 |
"Modified: 11.1.1997 / 14:43:05 / cg" |
0 | 754 |
! |
755 |
||
756 |
nextPutAll:something |
|
928 | 757 |
"append all of something to my displayed text. |
758 |
This allows TextCollectors to be used Stream-wise" |
|
0 | 759 |
|
3958 | 760 |
self show:(currentEmphasis notNil |
761 |
ifTrue:[something emphasizeAllWith:currentEmphasis] |
|
762 |
ifFalse:[something]) |
|
656 | 763 |
|
928 | 764 |
"Modified: 11.1.1997 / 14:43:26 / cg" |
0 | 765 |
! |
766 |
||
767 |
show:anObject |
|
768 |
"insert the argument aString at current cursor position" |
|
769 |
||
4045 | 770 |
|printString lines| |
0 | 771 |
|
4045 | 772 |
printString := anObject printString. |
928 | 773 |
|
4105
c2c3a96f8757
debug support: who sends a message
Claus Gittinger <cg@exept.de>
parents:
4073
diff
changeset
|
774 |
DebugSendersOfMessagePattern notNil ifTrue:[ |
4122 | 775 |
(DebugSendersOfMessagePattern match:printString string) ifTrue:[ |
4411 | 776 |
self halt:('Transcript: text matches: "', printString,'"'). |
4122 | 777 |
]. |
4105
c2c3a96f8757
debug support: who sends a message
Claus Gittinger <cg@exept.de>
parents:
4073
diff
changeset
|
778 |
]. |
4365 | 779 |
TraceSendersOfMessagePattern notNil ifTrue:[ |
780 |
(TraceSendersOfMessagePattern match:printString string) ifTrue:[ |
|
781 |
printString := self senderTraceString,': ',printString |
|
782 |
]. |
|
783 |
]. |
|
4105
c2c3a96f8757
debug support: who sends a message
Claus Gittinger <cg@exept.de>
parents:
4073
diff
changeset
|
784 |
|
4045 | 785 |
(printString includes:(Character cr)) ifTrue:[ |
786 |
lines := printString asStringCollection. |
|
653 | 787 |
lines keysAndValuesDo:[:nr :line | |
1562
9b7557a81849
made the number of buffered lines an instVar.
Claus Gittinger <cg@exept.de>
parents:
1504
diff
changeset
|
788 |
(nr == lines size |
4045 | 789 |
and:[(printString endsWith:(Character cr)) not]) ifTrue:[ |
653 | 790 |
"/ the last one. |
791 |
self show:line |
|
792 |
] ifFalse:[ |
|
793 |
self showCR:line |
|
794 |
]. |
|
795 |
]. |
|
796 |
^ self. |
|
308
b216a5efa2c8
handle show: with a string containing cr's
Claus Gittinger <cg@exept.de>
parents:
174
diff
changeset
|
797 |
]. |
b216a5efa2c8
handle show: with a string containing cr's
Claus Gittinger <cg@exept.de>
parents:
174
diff
changeset
|
798 |
|
1026 | 799 |
access critical:[ |
3295
37cb2b5d579a
Allow for readOnly TextCollectors
Stefan Vogel <sv@exept.de>
parents:
3248
diff
changeset
|
800 |
outstandingLine size ~~ 0 ifTrue:[ |
4045 | 801 |
outstandingLine := outstandingLine , printString |
1026 | 802 |
] ifFalse:[ |
4045 | 803 |
outstandingLine := printString |
653 | 804 |
]. |
1026 | 805 |
collecting ifTrue:[ |
806 |
flushPending ifFalse:[ |
|
807 |
self installDelayedUpdate |
|
1312
eaa44f7649f5
flush after some lines have been collected
Claus Gittinger <cg@exept.de>
parents:
1262
diff
changeset
|
808 |
] ifTrue:[ |
1562
9b7557a81849
made the number of buffered lines an instVar.
Claus Gittinger <cg@exept.de>
parents:
1504
diff
changeset
|
809 |
outstandingLines size > collectSize ifTrue:[ |
1312
eaa44f7649f5
flush after some lines have been collected
Claus Gittinger <cg@exept.de>
parents:
1262
diff
changeset
|
810 |
self endEntry |
eaa44f7649f5
flush after some lines have been collected
Claus Gittinger <cg@exept.de>
parents:
1262
diff
changeset
|
811 |
] |
1026 | 812 |
] |
813 |
] ifFalse:[ |
|
814 |
self endEntry |
|
653 | 815 |
] |
1026 | 816 |
]. |
0 | 817 |
|
4411 | 818 |
"Modified: / 24-03-2012 / 20:04:10 / cg" |
1617 | 819 |
! |
820 |
||
821 |
showCR:anObject |
|
822 |
"insert the argument aString at current cursor position, |
|
823 |
and advance to the next line. This is the same as a #show: |
|
824 |
followed by a #cr." |
|
825 |
||
4045 | 826 |
|printString lines| |
1617 | 827 |
|
4045 | 828 |
printString := anObject printString. |
829 |
printString size == 0 ifTrue:[ |
|
2689
ddaa98a64bd5
Fix #showCR: when displaying multi-line strings
Stefan Vogel <sv@exept.de>
parents:
2632
diff
changeset
|
830 |
self cr. |
ddaa98a64bd5
Fix #showCR: when displaying multi-line strings
Stefan Vogel <sv@exept.de>
parents:
2632
diff
changeset
|
831 |
^ self. |
1617 | 832 |
]. |
833 |
||
4105
c2c3a96f8757
debug support: who sends a message
Claus Gittinger <cg@exept.de>
parents:
4073
diff
changeset
|
834 |
DebugSendersOfMessagePattern notNil ifTrue:[ |
4122 | 835 |
(DebugSendersOfMessagePattern match:printString string) ifTrue:[ |
4410 | 836 |
self halt:('Transcript: text matches: "', printString, '"'). |
4365 | 837 |
]. |
838 |
]. |
|
839 |
TraceSendersOfMessagePattern notNil ifTrue:[ |
|
840 |
(TraceSendersOfMessagePattern match:printString string) ifTrue:[ |
|
841 |
printString := self senderTraceString,': ',printString |
|
4122 | 842 |
]. |
4105
c2c3a96f8757
debug support: who sends a message
Claus Gittinger <cg@exept.de>
parents:
4073
diff
changeset
|
843 |
]. |
c2c3a96f8757
debug support: who sends a message
Claus Gittinger <cg@exept.de>
parents:
4073
diff
changeset
|
844 |
|
4045 | 845 |
(printString includesAny:(String with:(Character cr) with:(Character return))) ifTrue:[ |
846 |
lines := printString asStringCollection. |
|
2689
ddaa98a64bd5
Fix #showCR: when displaying multi-line strings
Stefan Vogel <sv@exept.de>
parents:
2632
diff
changeset
|
847 |
lines do:[:line| |
4106 | 848 |
(line endsWith:Character nl) ifTrue:[ |
849 |
(line endsWith:Character return) ifTrue:[ |
|
850 |
self addLine:(line copyWithoutLast:2). |
|
851 |
] ifFalse:[ |
|
852 |
self addLine:(line copyWithoutLast:1). |
|
853 |
] |
|
2805 | 854 |
] ifFalse:[ |
4106 | 855 |
(line endsWith:Character return) ifTrue:[ |
856 |
self addLine:(line copyWithoutLast:1). |
|
857 |
] ifFalse:[ |
|
858 |
self addLine:line |
|
859 |
] |
|
2805 | 860 |
] |
1617 | 861 |
]. |
862 |
^ self. |
|
863 |
]. |
|
4106 | 864 |
self addLine:printString |
4365 | 865 |
|
4410 | 866 |
"Modified: / 24-03-2012 / 20:00:08 / cg" |
4073 | 867 |
! |
868 |
||
869 |
tab |
|
870 |
"append a tab-character to the stream. |
|
871 |
This is only allowed, if the receiver supports writing." |
|
872 |
||
873 |
self nextPut:(Character tab) |
|
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
874 |
! ! |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
875 |
|
2746 | 876 |
!TextCollector methodsFor:'stream messages-emphasis'! |
1822
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
877 |
|
2539 | 878 |
bgColor:aColor |
879 |
currentEmphasis := #backgroundColor->aColor |
|
880 |
! |
|
881 |
||
1822
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
882 |
bold |
3205 | 883 |
"switch to bold - followup text sent via show/nextPutAll: will be inserted in |
884 |
a bold font." |
|
885 |
||
1822
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
886 |
currentEmphasis := #bold |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
887 |
|
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
888 |
"Modified: / 26.3.1999 / 14:28:58 / cg" |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
889 |
! |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
890 |
|
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
891 |
color:aColor |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
892 |
currentEmphasis := #color->aColor |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
893 |
|
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
894 |
"Modified: / 26.3.1999 / 14:29:21 / cg" |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
895 |
! |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
896 |
|
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
897 |
italic |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
898 |
currentEmphasis := #italic |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
899 |
! |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
900 |
|
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
901 |
normal |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
902 |
currentEmphasis := nil |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
903 |
! |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
904 |
|
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
905 |
reverse |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
906 |
currentEmphasis := Array with:#color->bgColor |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
907 |
with:#backgroundColor->fgColor. |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
908 |
|
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
909 |
"Created: / 20.6.1998 / 20:10:45 / cg" |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
910 |
! |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
911 |
|
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
912 |
underline |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
913 |
currentEmphasis := #underline |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
914 |
|
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
915 |
"Created: / 26.3.1999 / 14:27:07 / cg" |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
916 |
! ! |
9abf58839e67
added #color: and #underline
Claus Gittinger <cg@exept.de>
parents:
1714
diff
changeset
|
917 |
|
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
918 |
!TextCollector methodsFor:'transcript specials'! |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
919 |
|
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
920 |
beTranscript |
928 | 921 |
"make the receiver be the systemTranscript; this one |
922 |
is accessable via the global Transcript and gets relevant |
|
923 |
system messages from various places." |
|
924 |
||
3852
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
925 |
self beTranscript:#Transcript |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
926 |
|
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
927 |
"Modified: / 2.11.1997 / 22:34:47 / cg" |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
928 |
! |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
929 |
|
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
930 |
beTranscript:name |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
931 |
"make the receiver be the systemTranscript; this one |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
932 |
is accessable via the global Transcript and gets relevant |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
933 |
system messages from various places." |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
934 |
|
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
935 |
|fg bg cFg cBg| |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
936 |
|
3852
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
937 |
Smalltalk at:name put:self. |
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
938 |
|
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
939 |
" |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
940 |
fancy feature: whenever Transcript is closed, reset to StdError |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
941 |
" |
1421
afef284eadc4
only reset Transcript to stdErr, if I really am the transcript.
ca
parents:
1389
diff
changeset
|
942 |
self destroyAction:[ |
3852
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
943 |
self == (Smalltalk at:name) ifTrue:[ |
8322d7c41f1c
refactored newTranscript to allow for another transcript to be opened
Claus Gittinger <cg@exept.de>
parents:
3774
diff
changeset
|
944 |
Smalltalk at:name put:Stderr |
1421
afef284eadc4
only reset Transcript to stdErr, if I really am the transcript.
ca
parents:
1389
diff
changeset
|
945 |
] |
afef284eadc4
only reset Transcript to stdErr, if I really am the transcript.
ca
parents:
1389
diff
changeset
|
946 |
]. |
0 | 947 |
|
928 | 948 |
"/ user may prefer a special color for this one; |
949 |
"/ look into the style definitions ... |
|
950 |
||
1389 | 951 |
fg := styleSheet colorAt:'transcript.foregroundColor' default:self foregroundColor. |
952 |
bg := styleSheet colorAt:'transcript.backgroundColor' default:self backgroundColor. |
|
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
953 |
self foregroundColor:fg backgroundColor:bg. |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
954 |
self viewBackground:bg. |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
955 |
|
1389 | 956 |
cFg := styleSheet colorAt:'transcript.cursorForegroundColor' default:bg. |
957 |
cBg := styleSheet colorAt:'transcript.cursorBackgroundColor' default:fg. |
|
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
958 |
self cursorForegroundColor:cFg backgroundColor:cBg. |
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
959 |
|
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
960 |
"self lineLimit:1000. " "or whatever you think makes sense" |
928 | 961 |
|
1389 | 962 |
"Modified: / 2.11.1997 / 22:34:47 / cg" |
2928
24991431c7e0
added #clear (to clear its contents)
Claus Gittinger <cg@exept.de>
parents:
2831
diff
changeset
|
963 |
! |
24991431c7e0
added #clear (to clear its contents)
Claus Gittinger <cg@exept.de>
parents:
2831
diff
changeset
|
964 |
|
24991431c7e0
added #clear (to clear its contents)
Claus Gittinger <cg@exept.de>
parents:
2831
diff
changeset
|
965 |
clear |
3119 | 966 |
self endEntry. |
2928
24991431c7e0
added #clear (to clear its contents)
Claus Gittinger <cg@exept.de>
parents:
2831
diff
changeset
|
967 |
self contents:nil. |
24991431c7e0
added #clear (to clear its contents)
Claus Gittinger <cg@exept.de>
parents:
2831
diff
changeset
|
968 |
|
24991431c7e0
added #clear (to clear its contents)
Claus Gittinger <cg@exept.de>
parents:
2831
diff
changeset
|
969 |
" |
24991431c7e0
added #clear (to clear its contents)
Claus Gittinger <cg@exept.de>
parents:
2831
diff
changeset
|
970 |
Transcript clear |
24991431c7e0
added #clear (to clear its contents)
Claus Gittinger <cg@exept.de>
parents:
2831
diff
changeset
|
971 |
" |
3774 | 972 |
! |
973 |
||
974 |
flash |
|
975 |
"make sure everything is visible, before flashing" |
|
976 |
||
977 |
self endEntry. |
|
978 |
super flash. |
|
0 | 979 |
! ! |
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
980 |
|
928 | 981 |
!TextCollector class methodsFor:'documentation'! |
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
982 |
|
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
983 |
version |
4411 | 984 |
^ '$Header: /cvs/stx/stx/libwidg/TextCollector.st,v 1.110 2012-03-24 19:04:56 cg Exp $' |
3958 | 985 |
! |
986 |
||
987 |
version_CVS |
|
4411 | 988 |
^ '$Header: /cvs/stx/stx/libwidg/TextCollector.st,v 1.110 2012-03-24 19:04:56 cg Exp $' |
363
d780a45df2d4
MVC operation: scroll to bottom when model changes the text.
Stefan Vogel <sv@exept.de>
parents:
308
diff
changeset
|
989 |
! ! |
2632 | 990 |
|
2025
0c9729befabc
allow current transcript to be reassigned temporarily
Claus Gittinger <cg@exept.de>
parents:
2024
diff
changeset
|
991 |
TextCollector initialize! |