[fix] can now attach readonly files to celeste mail messages
Wolfgang Eder
edw at xpoint.at
Mon Sep 4 19:16:18 UTC 2000
I was able to decompress the attachment
using Stuffit Expander with no problem.
I took the liberty to attach the uncompressed
file.
Cheers, Wolfgang
----------
>Von: Henrik Gedenryd <Henrik.Gedenryd at lucs.lu.se>
>An: <squeak at cs.uiuc.edu>
>Betreff: Re: [fix] can now attach readonly files to celeste mail messages
>Datum: 04. Sep 2000 19:47
>
> mike rutenberg wrote:
>
>> Celeste opened files for attachments using oldFileNamed:. This quietly
>> failed for readonly files (such as anything on a CDROM under windows).
>> This simple fix corrects that and means I can attach any file.
>>
>> This should go into the normal update stream. It is not important
>> enough to go into older versions, though should work without change.
>>
>> Mike
>
> <cough>
>
> Mike,
>
> when you post this fix for attachments, you'd have to attach the file in a
> way that makes it readable before it can become considered for inclusion. ;)
>
> The attachment appears as "Enclosure (HexEdit document)" and the contents
> are nothing but jumble.
>
> Henrik
>
>
-------------- next part --------------
'From Squeak2.9alpha of 4 August 2000 [latest update: #2524] on 4 September 2000 at 11:17:36 am'!
!CelesteComposition methodsFor: 'interface' stamp: 'mdr 8/31/2000 18:37'!
addAttachment
| file fileResult fileName |
textEditor
ifNotNil: [self hasUnacceptedEdits ifTrue: [textEditor accept]].
"transform into multipart if needed"
self hasAttachments ifFalse: [self transformToMultipart].
"then simply append another attachment section"
(fileResult _ StandardFileMenu oldFile)
ifNotNil:
[fileName _ fileResult directory fullNameFor: fileResult name.
file _ FileStream readOnlyFileNamed: fileName.
file ifNotNil: [self messageText: ((MailMessage from: self messageText)
asTextEncodingNewPart: file named: fileResult name)]] ! !
More information about the Squeak-dev
mailing list
|