The Trunk: System-nice.680.mcz

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

The Trunk: System-nice.680.mcz

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

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

Name: System-nice.680
Author: nice
Time: 23 July 2014, 12:15:58.869 am
UUID: 46ed1f7b-d575-4d6d-9985-5e0e9a40143d
Ancestors: System-kfr.679

RWStream Shoot them up part 4:
How to drop an image without a RWBinaryOrTextStream.
I feel like applying a balm on chicken pox one by one. There are a lot of them, my image is crippled, and it's itching considerably!

=============== Diff against System-kfr.679 ===============

Item was changed:
  ----- Method: ExternalDropHandler class>>defaultImageHandler (in category 'private') -----
  defaultImageHandler
  ^ExternalDropHandler
  type: 'image/'
  extension: nil
  action: [:stream :pasteUp :event |
  | image sketch |
  stream binary.
+ image := Form fromBinaryStream: stream contents asByteArray readStream.
- image := Form fromBinaryStream: ((RWBinaryOrTextStream with: stream contents) reset).
  Project current resourceManager
  addResource: image
  url: (FileDirectory urlForFileNamed: stream name) asString.
  sketch := World drawingClass withForm: image.
  pasteUp addMorph: sketch centeredNear: event position.
  image := sketch := nil]!