The Trunk: MorphicExtras-nice.152.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: MorphicExtras-nice.152.mcz

commits-2
Nicolas Cellier uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-nice.152.mcz

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

Name: MorphicExtras-nice.152
Author: nice
Time: 20 July 2014, 10:45:41.304 pm
UUID: 5456ca44-9e02-48c1-80f6-d4379e1b1b71
Ancestors: MorphicExtras-kfr.150

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

=============== Diff against MorphicExtras-kfr.150 ===============

Item was changed:
  ----- Method: GraphicalDictionaryMenu>>encodeToWorkspace (in category 'menu commands') -----
  encodeToWorkspace
+ | stream encodedStream pict text |
+ pict := formChoices at: currentIndex.
+ stream := ByteArray new writeStream.
+ PNGReadWriter putForm: pict onStream: stream.
+ encodedStream := stream contents base64Encoded.
+ text := Workspace open model.
+ text contents: 'Form fromBinaryStream: (Base64MimeConverter mimeDecodeToBytes: ''', encodedStream,''' readStream)'!
- | stream encodedStream pict text |
- pict := formChoices at: currentIndex.
- stream := RWBinaryOrTextStream on: (String new).
- PNGReadWriter putForm: pict onStream: stream.
- encodedStream := stream contents asByteArray base64Encoded.
- text := (Workspace open) model.
- text contents: 'Form fromBinaryStream: (Base64MimeConverter mimeDecodeToBytes: ''', encodedStream,''' readStream)'!