[squeak-dev] FileList "Workspace from Foo.txt" is a redundant OCD nightmare

Eliot Miranda eliot.miranda at gmail.com
Sun Oct 18 12:41:48 UTC 2020


Hi Tim,


> On Oct 18, 2020, at 3:57 AM, gettimothy via Squeak-dev <squeak-dev at lists.squeakfoundation.org> wrote:
> 
> 
> Ignore as fitting

I can join you; this gets on my tits.

> 
> https://www.pinterest.com/indigogeek/ocd-nightmares/
> 
> 
> FileList >>viewContentsInWorkspace
> "View the contents of my selected file in a new workspace"
> 
> | aString aFileStream aName |
> aString := (aFileStream := directory readOnlyFileNamed: self fullName) setConverterForCode contentsOfEntireFile.
> aName := aFileStream localName.
> aFileStream close.
> UIManager default edit: aString withSqueakLineEndings label: 'Workspace from ', aName
> 
> maybe its the OCD in me, but that verbiage preceding the file name at the top of a workspace is redundant and annoying.
> 
> 1. redundant--it is at the top of a Workspace.
> 2. the infinitely expanding title ala Worspace from Workspace from Worspace from Workspace from Foo.txt
> 3. I have to edit each title upon file in. see OCD above.
> 
> 
> A simple change to the method:
> FileList >> viewContentsInWorkspace
> "View the contents of my selected file in a new workspace"
> 
> | aString aFileStream aName |
> aString := (aFileStream := directory readOnlyFileNamed: self fullName) setConverterForCode contentsOfEntireFile.
> aName := aFileStream localName.
> aFileStream close.
> UIManager default edit: aString withSqueakLineEndings label: aName
> 
> 
> 
> eradicates the OCD nightmare  

The only thing I’d suggest differently is that it check if the file name contains “Workspace’ and if not, still adds the ‘Workspace from ’ prefix.

> cheers,
> 
> tty
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20201018/928ab7ee/attachment.html>


More information about the Squeak-dev mailing list