ActorStream.st
changeset 3469 f8a8860f7253
parent 3089 c0936306138e
child 3531 88c3aa9a14fc
--- a/ActorStream.st	Sat Jan 24 01:05:51 2015 +0100
+++ b/ActorStream.st	Tue Jan 27 14:54:15 2015 +0100
@@ -11,6 +11,8 @@
 "
 "{ Package: 'stx:libbasic2' }"
 
+"{ NameSpace: Smalltalk }"
+
 PeekableStream subclass:#ActorStream
 	instanceVariableNames:'nextPutBlock nextPutAllBlock nextPutLineBlock nextBlock
 		atEndBlock peekBlock contentsSpecies'
@@ -120,6 +122,17 @@
     super nextPutAll:something
 !
 
+nextPutAll:something startingAt:start to:stop
+    "put some elements of something onto the stream by evaluating
+     the nextPutAllBlock with something as argument.
+     If there is no nextPutAllBlock, nextPuts will be used (as inherited)"
+
+    nextPutAllBlock notNil ifTrue:[    
+        ^ nextPutAllBlock value:(something copyFrom:start to:stop)
+    ].
+    super nextPutAll:something startingAt:start to:stop
+!
+
 nextPutByte:something
     "put something onto the stream by evaluating the nextPutBlock with
      something as argument"
@@ -212,6 +225,6 @@
 !ActorStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/ActorStream.st,v 1.12 2013-08-18 10:55:48 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/ActorStream.st,v 1.13 2015-01-27 13:54:15 cg Exp $'
 ! !