[squeak-dev] The Trunk: Morphic-fbs.655.mcz

Frank Shearar frank.shearar at gmail.com
Mon Jun 3 11:32:05 UTC 2013


On 3 June 2013 12:05, Bert Freudenberg <bert at freudenbergs.de> wrote:
> On 2013-06-01, at 22:20, commits at source.squeak.org wrote:
>
>> Frank Shearar uploaded a new version of Morphic to project The Trunk:
>> http://source.squeak.org/trunk/Morphic-fbs.655.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Morphic-fbs.655
>> Author: fbs
>> Time: 1 June 2013, 11:19:58.083 pm
>> UUID: b2ebeb75-74c9-4909-b81c-8eb82350599a
>> Ancestors: Morphic-fbs.654
>>
>> Move MailComposition >> #addAttachment to Morphic-Support because the sole sender of #addAttachment (MailComposition >> #morphicOpen) is in Morphic-Support.
>>
>> =============== Diff against Morphic-fbs.653 ===============
>>
>> Item was added:
>> + ----- Method: MailComposition>>addAttachment (in category '*Morphic-Support') -----
>> + addAttachment
>> +     | file fileResult fileName |
>> +     textEditor
>> +             ifNotNil: [self hasUnacceptedEdits ifTrue: [textEditor accept]].
>> +
>> +     (fileResult := StandardFileMenu oldFile)
>> +             ifNotNil:
>> +                     [fileName := fileResult directory fullNameFor: fileResult name.
>> +                     file := FileStream readOnlyFileNamed: fileName.
>> +                     file ifNotNil:
>> +                             [file binary.
>> +                             self messageText:
>> +                                             ((MailMessage from: self messageText asString)
>> +                                                     addAttachmentFrom: file withName: fileResult name; text).
>> +                             file close]] !
>
>
>
> Is that a good enough reason to make this an extension method? Just because the only current sender is an outside package doesn't necessarily mean it belongs to that package, does it? It seems innocuous to me, but it's quite possible I'm overlooking something.

My primary concern is that it doesn't belong in Network. I had
originally thought to put it in Tools (because StandardFileMenu is in
Tools), but (a) Morphic-Support already depends on Tools (so no
additional dependencies), and (b) Morphic-Support's the thing that
actually uses it.

So if the method disappeared entirely it'd only be Morphic-Support that cared.

frank

> - Bert -
>
>
>


More information about the Squeak-dev mailing list