Re: [COTDC] 26 - PickAFileToWriteNotification
Posted by
laurent laffont on
Mar 07, 2011; 5:36pm
URL: https://forum.world.st/COTDC-26-PickAFileToWriteNotification-tp3338088p3339543.html
Indeed there's no reference in Pharo.
In Squeak it is used by PostscriptEncoderToDisk and DSCPostscriptCanvasToDisk which don't exist in Pharo.
So I suppose that it can be safely removed.
Thanks Fernando & Carlo (I like the code snippet).
Laurent.
On Mon, Mar 7, 2011 at 1:13 AM, Carlo
<[hidden email]> wrote:
I provide a way to indicate that an object would like a file to write to.
You can use me as follows:
| file |
[file := PickAFileToWriteNotification signal.
file inspect]
on: PickAFileToWriteNotification
do: [:ex |
| newFileName stream |
newFileName := FillInTheBlankMorph request: 'Name of file to write:' translated initialAnswer: 'xxx'.
stream := FileStream fileNamed: newFileName.
stream
ifNotNil: [ex resume: stream]]
On 06 Mar 2011, at 11:29 PM, laurent laffont wrote:
Today: PickAFileToWriteNotification
Comment Of The Day Contest - One Day One Comment
Rules:
#1: Each day a not commented class is elected. Each day the best comment will be integrated with name of the author(s).
#2: If you cannot comment it, deprecate it.
Laurent