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

Marcel Taeumel marcel.taeumel at hpi.de
Wed Jan 26 07:38:40 UTC 2022


Hi all --

I fixed that filout issue in Transcript. Thanks for the pointer. Disabling/changing accept/cancel just for the Transcript case is not that simple, I suppose. Hmm... at not that important at the moment. Sorry.

Best,
Marcel
Am 25.01.2022 23:08:31 schrieb Jaromir Matas <mail at jaromir.net>:
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/20220126/c00d88cf/attachment.html>


More information about the Squeak-dev mailing list