allow subclasses to redefine sourceChunk reading
authorClaus Gittinger <cg@exept.de>
Mon, 13 May 2002 11:31:18 +0200
changeset 6541 71931678b94c
parent 6540 cf1a6a1a8645
child 6542 ecfe70e462fe
allow subclasses to redefine sourceChunk reading
Method.st
--- a/Method.st	Mon May 13 11:30:46 2002 +0200
+++ b/Method.st	Mon May 13 11:31:18 2002 +0200
@@ -560,12 +560,7 @@
 
         aStream := self sourceStream.
         aStream notNil ifTrue:[
-            Stream positionErrorSignal handle:[:ex |
-                ^ nil
-            ] do:[
-                aStream position:sourcePosition abs.
-            ].
-            junk := aStream nextChunk.
+            junk := self sourceChunkFromStream:aStream.
 
             OperatingSystem isMSDOSlike ifTrue:[
                 "
@@ -600,6 +595,15 @@
     sourcePosition := nil
 !
 
+sourceChunkFromStream:aStream
+    Stream positionErrorSignal handle:[:ex |
+        ^ nil
+    ] do:[
+        aStream position:sourcePosition abs.
+    ].
+    ^ aStream nextChunk.
+!
+
 sourceFilename
     "return the sourcefilename if source is extern; nil otherwise"
 
@@ -2814,6 +2818,6 @@
 !Method class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.241 2002-02-26 11:40:42 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.242 2002-05-13 09:31:18 cg Exp $'
 ! !
 Method initialize!