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

gettimothy gettimothy at zoho.com
Sun Oct 18 10:57:28 UTC 2020


Ignore as fitting



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  







cheers,



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


More information about the Squeak-dev mailing list