[squeak-dev] The Trunk: Morphic-nice.736.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Jul 20 20:50:39 UTC 2014


Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.736.mcz

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

Name: Morphic-nice.736
Author: nice
Time: 20 July 2014, 10:48:25.122 pm
UUID: 60fdaaeb-b09f-42d7-8ce4-d8a26f90dacf
Ancestors: Morphic-cmm.734

Don't use RWBinaryOrTextStream where a simple WriteStream would perfectly do the job.

=============== Diff against Morphic-cmm.734 ===============

Item was changed:
  ----- Method: MorphicProject class>>compileNewDefaultBackgroundFrom: (in category 'utilities') -----
  compileNewDefaultBackgroundFrom: aForm 
  	"Compile a new #defaultBackgroundForm method in this class-side which uses aForm as the background."
+ 	| formStream base64 |
+ 	formStream := ByteArray new writeStream.
- 	| formStream base64Stream |
- 	formStream := RWBinaryOrTextStream on: ByteArray new.
  	PNGReadWriter
  		putForm: aForm
  		onStream: formStream.
+ 	base64 := formStream base64Encoded.
- 	base64Stream := Base64MimeConverter mimeEncode: formStream.
  	self class
  		compile:
  			(String streamContents:
  				[ : stream | stream
  					 nextPutAll: 'defaultBackgroundForm
  	^ Form fromBinaryStream: ' ;
  					 nextPut: $' ;
+ 					 nextPutAll: base64 ;
- 					 nextPutAll: base64Stream contents ;
  					 nextPut: $' ;
  					nextPutAll: ' base64Decoded asByteArray readStream' ])
  		classified: 'class initialization'!



More information about the Squeak-dev mailing list