[squeak-dev] The Trunk: Files-ul.103.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Mar 15 12:32:22 UTC 2011
Levente Uzonyi uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-ul.103.mcz
==================== Summary ====================
Name: Files-ul.103
Author: ul
Time: 15 March 2011, 1:32:09.51 pm
UUID: 37239424-c06c-124d-9314-bc01c8f9d451
Ancestors: Files-ul.102
- minor tweaks
=============== Diff against Files-ul.102 ===============
Item was changed:
----- Method: RemoteString>>text (in category 'accessing') -----
text
"Answer the receiver's string asText if remote files are enabled."
+
| theFile |
+ theFile := (SourceFiles at: (sourceFileNumber ifNil: [ ^nil ])) ifNil: [ ^nil ].
+ theFile size < filePositionHi ifTrue: [
- (sourceFileNumber == nil or: [(SourceFiles at: sourceFileNumber) == nil]) ifTrue: [^ nil].
- theFile := SourceFiles at: sourceFileNumber.
- filePositionHi > theFile size ifTrue: [
self error: 'RemoteString past end of file' ].
+ ^theFile
- ^theFile
position: filePositionHi;
nextChunkText!
Item was changed:
----- Method: StandardFileStream>>peek (in category 'read, write, position') -----
peek
+ "Answer what would be returned if the message next were sent to the receiver. If the receiver is at the end, answer nil."
+
- "Answer what would be returned if the message next were sent to the receiver. If the receiver is at the end, answer nil. "
| next |
+ next := self basicNext ifNil: [ ^nil ].
+ collection ifNotNil: [
+ "#basicNext ensures that this is enough"
+ position := position - 1.
+ ^next ].
+ self skip: -1.
+ ^next!
- self atEnd ifTrue: [^ nil].
- next := self basicNext.
- self position: self position - 1.
- ^ next!
More information about the Squeak-dev
mailing list
|