[squeak-dev] fileout workspace contents on accept preference issues
bernhard at pieber.com
Thu Dec 30 08:00:41 UTC 2021
Funny, I recently stumbled over this as well. It would be great if things could be improved in that area. As for the file extension: I would suggest using .ws.st. This has the advantage that some tools and platforms (e.g. GitHub) recognise it as Smalltalk code files. At the same time it is clear that it is not in chunk format but specifically a workspace file. That is the reason why .pkg.st was chosen as the extension for Cuis package files.
> Am 26.12.2021 um 06:40 schrieb tim Rowledge <tim at rowledge.org>:
> Whilst running down the list of preference I noticed a new one (to me, at least) to save a Workspace's content to a file when you accept.
> Now that's quite a nice idea, but it clashes a bit with something we already had - you could save a Workspace to a file using the window menu.
> Later one might open that file from a FileList, which actually involves making a weird instance of a FileList showing only a text view. And that brings up the decidedly naff hierarchy of FileList2 etc and... blech. But whatever, you get a file editor that saves the text on accept. And that (mis)uses #newFileNamed: in such a way that deciding to cancel opens a debugger, of all things. Very naff. I hope to offer some improvements to that situation soon.
> This new Workspace regime has the same 'save contents to file...' window menu entry but it now also saves the directory part of the chosen filename and resets the window title to the leaf name. That means if you change the window title it will change the filename used to save your content in, which isn't really telegraphed anywhere and could be very confusing. Perhaps if the window label were actually shown as the full file path it might make if a bit more obvious?
> Also, a suggestion relating to the above editing of files from the FileList; I don't see any reason not to open a workspace(*) instead of the rather weird subtype of FileList-with-no-file-list-capability. It would be more consistent to open a WorkSpace, save it, and then open a WorkSpace from the FileList. Perhaps if we saved as a '.wkspc' file instead of a rather generic '.text' we might make a Service entry to discriminate between a workspace file and a plain text file? Obviously a plain text file should be edited within a not-code-editor environment as well, so some small refactoring of StringHolder/Workspace might be needed. It would also be an opportunity to dump the odd-file-list thing.
> And finally for tonight, it reminds me of the tacky mess we have in menu setup now. We have jolly nice hierarchical menus that we really should use more often and more effectively. Look at the Workspace menu - 27 entries and a 'more...' then 18 more. Are we Microsoft or something?
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> How do I set my laser printer on stun?
More information about the Squeak-dev