--- a/PositionableStream.st Fri Dec 06 15:32:45 2002 +0100
+++ b/PositionableStream.st Fri Dec 06 15:37:49 2002 +0100
@@ -376,10 +376,14 @@
"file in from the receiver, i.e. read chunks and evaluate them -
return the value of the last chunk."
- |oldPath val|
+ |oldPath val notifiedLoader|
+
+ SourceFileLoader notNil ifTrue:[
+ notifiedLoader := SourceFileLoader on:self.
+ ].
self isFileStream ifFalse:[
- ^ self fileInNotifying:(SourceFileLoader on:self) passChunk:true.
+ ^ self fileInNotifying:notifiedLoader passChunk:true.
].
[ |thisDirectory|
@@ -388,11 +392,7 @@
thisDirectory := self pathName asFilename directory.
Smalltalk systemPath:(oldPath copy addFirst:thisDirectory pathName; yourself).
CurrentFileInDirectoryQuerySignal answer:thisDirectory do:[
- SourceFileLoader isNil ifTrue:[
- val := self fileInNotifying:nil passChunk:true.
- ] ifFalse:[
- val := self fileInNotifying:(SourceFileLoader on:self) passChunk:true.
- ]
+ val := self fileInNotifying:notifiedLoader passChunk:true.
]
] ensure:[
Smalltalk systemPath:oldPath.
@@ -470,6 +470,14 @@
|aString sawExcla rslt done|
+ Smalltalk::Compiler isNil ifTrue:[
+ self isFileStream ifTrue:[
+ Transcript show:('[' , self pathName , '] ').
+ ].
+ Transcript showCR:'cannot fileIn (no compiler).'.
+ ^ nil.
+ ].
+
self skipSeparators.
self atEnd ifFalse:[
sawExcla := self peekFor:(self class chunkSeparator).
@@ -1141,7 +1149,7 @@
!PositionableStream class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/PositionableStream.st,v 1.117 2002-12-06 14:32:45 penk Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/PositionableStream.st,v 1.118 2002-12-06 14:37:49 penk Exp $'
! !
PositionableStream initialize!