The Trunk: Network-topa.221.mcz

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

The Trunk: Network-topa.221.mcz

commits-2
Tobias Pape uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-topa.221.mcz

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

Name: Network-topa.221
Author: topa
Time: 7 March 2018, 10:47:10.905474 pm
UUID: 97fe2e2e-af08-4563-be27-8eb163d1bafe
Ancestors: Network-tpr.220

Slight improvement to tim's improvement

=============== Diff against Network-tpr.220 ===============

Item was changed:
  ----- Method: MailComposition>>addAttachment (in category 'actions') -----
  addAttachment
- | file  fileName |
-
- self saveFields.
- fileName := FileChooserDialog openOn: FileDirectory default pattern: nil label: 'Choose attachment'.
- fileName ifNil: [^self].
 
+ self saveFields.
+ (FileChooserDialog openOn: FileDirectory default pattern: nil label: 'Choose attachment') ifNotNil:
+ [:fileName |
+ FileStream readOnlyFileNamed: fileName do:
+ [:file |
+ file binary.
+ mailMessage
+ addAttachmentFrom: file
+ withName: (FileDirectory localNameFor: fileName)].
+ self changed: #messageText]. !
- file := FileStream readOnlyFileNamed: fileName.
- file ifNotNil: [file binary.
- mailMessage addAttachmentFrom: file withName:  (FileDirectory localNameFor: fileName) .
- file close.
- self changed: #messageText] !