SequenceableCollection.st
changeset 379 5b5a130ccd09
parent 375 e5019c22f40e
child 384 cc3d110ea879
--- a/SequenceableCollection.st	Thu Aug 10 14:14:29 1995 +0200
+++ b/SequenceableCollection.st	Thu Aug 10 14:32:31 1995 +0200
@@ -21,7 +21,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.34 1995-08-08 00:48:47 claus Exp $
+$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.35 1995-08-10 12:31:00 claus Exp $
 '!
 
 !SequenceableCollection class methodsFor:'documentation'!
@@ -42,7 +42,8 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.34 1995-08-08 00:48:47 claus Exp $
+$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.35 1995-08-10 12:31:00 claus Exp $
+$Revision: 1.35 $
 "
 !
 
@@ -282,7 +283,6 @@
 	] ifFalse: [
 	    totalLength := totalLength + lineString size + sepCnt
 	].
-	0
     ].
     endCharacter isNil ifTrue:[
 	totalLength := totalLength - 1
@@ -368,6 +368,21 @@
      #('foo' 'bar' 'baz') 
 	asStringWith:(Character cr) from:1 to:3 compressTabs:false final:(Character cr) 
     "
+!
+
+decodeAsLiteralArray
+    |cls|
+
+    cls := Smalltalk at:(self first) ifAbsent:nil.
+    cls isNil ifTrue:[
+	^ self error:'unknown class in spec:' , self first.
+    ].
+    ^ cls new fromLiteralArrayEncoding:self.
+
+    "
+     #(Point 10 20) decodeAsLiteralArray  
+     #(Rectangle 100 200 400 500) decodeAsLiteralArray 
+    "
 ! !
 
 !SequenceableCollection methodsFor:'comparing'!