--- a/TextView.st Sat Jun 08 11:11:23 1996 +0200
+++ b/TextView.st Sat Jun 08 11:51:09 1996 +0200
@@ -942,30 +942,31 @@
|startNr nLines string|
- "on some systems, writing linewise is very slow (via NFS)
- therefore we convert to a string and write it in big chunks.
- To avoid creating huge strings, we do it in blocks of 1000 lines,
- limiting temporary string creation to about 50-80k.
- "
- startNr := 1.
- nLines := list size.
- [startNr <= nLines] whileTrue:[
- string := list asStringWithCRsFrom:startNr
- to:((startNr + 1000) min:nLines)
- compressTabs:compressTabs.
- aStream nextPutAll:string.
- startNr := startNr + 1000 + 1.
- ].
+ aStream isFileStream ifTrue:[
+ "on some systems, writing linewise is very slow (via NFS)
+ therefore we convert to a string and write it in big chunks.
+ To avoid creating huge strings, we do it in blocks of 1000 lines,
+ limiting temporary string creation to about 50-80k.
+ "
+ startNr := 1.
+ nLines := list size.
+ [startNr <= nLines] whileTrue:[
+ string := list asStringWithCRsFrom:startNr
+ to:((startNr + 1000) min:nLines)
+ compressTabs:compressTabs.
+ aStream nextPutAll:string.
+ startNr := startNr + 1000 + 1.
+ ].
+ ] ifFalse:[
+ list do:[:aLine |
+ aLine notNil ifTrue:[
+ aStream nextPutAll:aLine.
+ ].
+ aStream cr
+ ]
+ ]
-"/ "the old (obsolete) code:"
-"/
-"/ list do:[:aLine |
-"/ aLine notNil ifTrue:[
-"/ aStream nextPutAll:aLine.
-"/ ].
-"/ aStream cr
-"/ ]
-
+ "Modified: 8.6.1996 / 11:50:46 / cg"
!
getFontParameters
@@ -2203,5 +2204,5 @@
!TextView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.60 1996-05-31 07:26:38 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.61 1996-06-08 09:51:09 cg Exp $'
! !