[squeak-dev] The Trunk: Collections-mt.962.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Mon Nov 29 17:05:37 UTC 2021


Hi Levente --

Okay. I will put this back on my plate and deal with it tomorrow. Let's see whether I can manage to remove that Collections -> System dependency altogether.

Thanks for your review!

Best,
Marcel
Am 27.11.2021 09:56:39 schrieb Levente Uzonyi <leves at caesar.elte.hu>:
Hi Marcel,

This change adds another (2nd) dependency between Collections and System.
I think it would be better if this method were in another package with
initialAnswer: being a parameter.

I also think that the methods with similar name of Model in the Kernel
package do not belong there. They are entirely related to files and not
the Model itself.
Model's subclasses can override #suggestedFileNameForSave, but that
abstraction is clearly not sufficient in case of TranscriptStream, hence
this method. It's also not used at all in Trunk.

I also think there's also a small bug with this method: Model's
implementation handles the case where the selected filename is nil, and I
don't see why that cannot happen here but this method assumes it is always
a string.


Levente

P.S.: I vaguely remember complaining when the first dependency between
Colllections and System appeared back in 2020 (HtmlReadWriter ->
RealEstateAgent).

On Thu, 25 Nov 2021, commits at source.squeak.org wrote:

> Marcel Taeumel uploaded a new version of Collections to project The Trunk:
> http://source.squeak.org/trunk/Collections-mt.962.mcz
>
> ==================== Summary ====================
>
> Name: Collections-mt.962
> Author: mt
> Time: 25 November 2021, 11:50:55.017354 am
> UUID: 3826da22-e39d-2a4a-ada1-95f8f67c85fd
> Ancestors: Collections-pre.961
>
> Tools-mt.1075
>
> =============== Diff against Collections-pre.961 ===============
>
> Item was added:
> + ----- Method: TranscriptStream>>saveContents:accessMode: (in category 'model protocol') -----
> + saveContents: stringContents accessMode: accessMode
> + "Interactive callback from TextEditor. See commentary in Model class."
> +
> + ^ (Project uiManager
> + saveFilenameRequest: 'Save text contents in file...'
> + initialAnswer: 'Transcript.text')
> + 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/20211129/56f5ffb5/attachment.html>


More information about the Squeak-dev mailing list