Bug when opening Transcript
Tim Olson
tim at jumpnet.com
Thu Jun 4 03:58:09 UTC 1998
>It definitely is getting weirded out by sending things to a collapsed
>Transcript. I played with it some more and found the following simple
>test can be used to get it to hang. (Note that number of lines, their
>relative length and not starting with a cleared transcript can affect
>your results).
Looks like the problem is that the text is replaced without recomposing
the paragraph, leading to incoherent state. Here's a fix that seems to
work, although I don't know if it is the "correct" fix:
'From Squeak 2.0 of May 22, 1998 on 3 June 1998 at 10:56:40 pm'!
"Change Set: TranscriptFix
Date: 3 June 1998
Author: Tim Olson
possible fix to Transcript display problem"!
!Paragraph methodsFor: 'composition' stamp: 'tao 6/3/1998 22:49'!
invalidateComposition
"force a recomposition on the next display"
lastLine _ nil.! !
!PluggableTextController methodsFor: 'transcript' stamp: 'tao 6/3/1998
22:51'!
appendEntry
"Append the text in the model's writeStream to the editable text. "
view topView isCollapsed ifTrue:
[paragraph invalidateComposition. ^ paragraph text replaceFrom: 1 to:
paragraph text size
with: model contents asText].
self deselect.
paragraph text size > model characterLimit ifTrue:
["Knock off first half of text"
self selectInvisiblyFrom: 1 to: paragraph text size // 2.
self replaceSelectionWith: Text new].
self selectInvisiblyFrom: paragraph text size + 1 to: paragraph text
size.
self replaceSelectionWith: model contents asText.
self selectInvisiblyFrom: paragraph text size + 1 to: paragraph text
size! !
-- tim
More information about the Squeak-dev
mailing list
|