[squeak-dev] Accept on a Transcript window removes the contents without any undo

Jaromir Matas mail at jaromir.net
Tue Jan 25 22:08:18 UTC 2022


Hi,

From: tim Rowledge<mailto:tim at rowledge.org>
Sent: Tuesday, January 25, 2022 21:08
To: The general-purpose Squeak developers list<mailto:squeak-dev at lists.squeakfoundation.org>
Subject: Re: [squeak-dev] Accept on a Transcript window removes the contents without any undo

> On 2022-01-25, at 6:19 AM, mail at jaromir.net wrote:
>
> Hi Marcel, all,
>
> Accept on a Transcript window removes the contents without any undo. This is very surprising and for sure unexpected :)
>
> It would probably be better if it didn't do anything rthaer than that.

It would be far better if the Transcript window didn't have an accept menu entry. And if that were done, then I'd suggest that the cancel should be replaced with something like 'clear', since we bind accept & cancel quite tightly together. Indeed, I'd claim that almost nothing int he current transcript window menu should be there; a transcript is supposed to be a logfile-reader analogue, not any sort of working space.

I’ve tried the “save contents to file…” on the menu - there seems to be a little bug: it opens the Debugger on Cancel… here’s a possible fix:
```
TranscriptStream >> saveContents: stringContents accessMode: accessMode
                "Interactive callback from TextEditor. See commentary in Model class."

                ^ (Project uiManager
                                saveFilenameRequest: 'Save text contents in file...'
                                initialAnswer: 'Transcript.text')
                                                ifNil: [^false];    "<------- here’s the fix"
                                                ifEmpty: [false]
                                                ifNotEmpty: [:fileName |
                                                                Model new
                                                                                saveContents: stringContents
                                                                                onFileNamed: fileName
                                                                                accessMode: accessMode].
```


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220125/382f85fb/attachment.html>


More information about the Squeak-dev mailing list