[squeak-dev] The Trunk: Collections-dtl.715.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Aug 30 00:15:30 UTC 2016


David T. Lewis uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-dtl.715.mcz

==================== Summary ====================

Name: Collections-dtl.715
Author: dtl
Time: 27 August 2016, 11:16:53.919203 pm
UUID: 7d00851c-8dae-4128-9550-138e30c644f5
Ancestors: Collections-ul.714

When the redirectToStdOut preference is enabled, let the standard output stream be a view on the Transcript. Flush output to stdout on endEntry. Make cr and lf work for the stdout view. Permit other views to continue functioning normally in the image, with the standard output as an additional view.

=============== Diff against Collections-ul.714 ===============

Item was changed:
  ----- Method: TranscriptStream class>>redirectToStdOut: (in category 'preferences') -----
  redirectToStdOut: aBoolean
  
+ 	(RedirectToStdOut := aBoolean)
+ 		ifTrue: [Transcript addDependent: FileStream stdout]
+ 		ifFalse: [Transcript removeDependent: FileStream stdout].!
- 	RedirectToStdOut := aBoolean.!

Item was added:
+ ----- Method: TranscriptStream>>nextPut: (in category 'stream extensions') -----
+ nextPut: anObject 
+ 	self target == self ifFalse: [self target nextPut: anObject]. "delegated to stdout"
+ 	^ super nextPut: anObject.!

Item was added:
+ ----- Method: TranscriptStream>>nextPutAll: (in category 'stream extensions') -----
+ nextPutAll: aCollection
+ 	self target == self ifFalse: [self target nextPutAll: aCollection]. "delegated to stdout"
+ 	^ super nextPutAll: aCollection.!

Item was changed:
  ----- Method: TranscriptStream>>show: (in category 'stream extensions') -----
  show: anObject
  	"TextCollector compatibility"
  	
  	[
+ 		self nextPutAll: anObject asString.
- 		self target nextPutAll: anObject asString.
  		self endEntry
  	] on: FileWriteError do: [self class redirectToStdOut: false].!

Item was changed:
  ----- Method: TranscriptStream>>showln: (in category 'stream extensions') -----
  showln: anObject
  	"TextCollector compatibility. Ensure a new line before inserting a message."
  	
  	[
+ 		self
- 		self target
  			cr;
  			nextPutAll: anObject asString.
  		self endEntry.
  	] on: FileWriteError do: [self class redirectToStdOut: false].!

Item was removed:
- ----- Method: WriteStream>>flush (in category 'accessing') -----
- flush!



More information about the Squeak-dev mailing list