--- a/Collection.st Sat Jan 08 17:29:16 1994 +0100
+++ b/Collection.st Sat Jan 08 17:37:20 1994 +0100
@@ -24,7 +24,7 @@
Abstract superclass for all collections
-$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.7 1993-12-19 23:39:45 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.8 1994-01-08 16:37:20 claus Exp $
'!
!Collection class methodsFor:'initialization'!
@@ -393,7 +393,8 @@
!
asByteArray
- "return a new ByteArray with the collections elements"
+ "return a new ByteArray with the collections elements
+ (which must convert to integers in the range 0..255)."
|aByteArray
index "<SmallInteger>" |
@@ -409,7 +410,7 @@
asString
"return a String with the collections elements
- (which must convertable to characters)"
+ (which must convert to characters)"
|aString
index "<SmallInteger>" |
@@ -426,14 +427,11 @@
asText
"return a new Text-object with the elements printstings"
- |aText
- index "<SmallInteger>" |
+ |aText|
- aText := Text new:(self size).
- index := 1.
+ aText := Text new.
self do:[:each |
- aText at:index put:(each printString).
- index := index + 1
+ aText add:(each printString).
].
^ aText
!