[squeak-dev] More pluggable dialog fun (was Re: FileChooser/SaverDialog)

tim Rowledge tim at rowledge.org
Sat Nov 11 02:05:30 UTC 2017


> On 10-11-2017, at 5:53 PM, David T. Lewis <lewis at mail.msen.com> wrote:
> 
> For the saveAs operation, I would want to be able to edit the default file name, and
> that appears in the edit box at the top of the FileSaver window, so this is good. I
> also might want to save in a different directory, and the directory navigator on the
> lower left side lets me do that, also good. 

That is the idea.

> 
> If I highlight a specific file on the lower right side, that becomes the new suggested
> file name in the top edit box. This makes sense if the file I select is foo.image but
> not if it is foo.changes or foo.cs or foo.txt.

Yes, for the case where one knows what kind of file is being saved it should be limiting the options  - I *think* that would work with setting the pattern appropriately. The saver doesn’t currently use the pattern at all. I suppose we’d want to parse and ‘correct’ any typed in filename to match that limit. Suggestions on expected behaviour welcomed.

There’s probably a case for allowing a no-new-file or no-old-file test too; at least to the extent that trying to choose an existing file can raise a warning of the ‘are you sure?’ kind.

> 
> I think that I would expect the dialog (lower right side) to present only the file
> names that I can legitimately select (because they end in '.image'). Or I would
> expect it to "grey out" the entries that I am not permitted to use, such that only
> file names that end in '.image' can be highlighted and thus moved into the top
> file name edit box.

Perhaps solvable in the same changes as above?

> 
> I think I would also expect the suggested file name that initially appears in the
> top edit box to also be highlighted in the panels below. If my current image name
> is 'foo.image' then I would expect 'foo.image' to appear both in the edit box on
> the top, and also as the selected file in the lower right navigator pane. Then,
> if I navigate to another directory and select some other file named 'bar.image',
> I expect 'bar.image' to appear in the text edit box at the top. But if I navigate
> to a directory and select 'bar.st', I expect the FileSave to say "I'm sorry Dave,
> I'm afraid I can't do that”.

I made it highlight any file matching the typed in name but maybe it isn’t working for the initial startup. Ah, nope.


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
No, I don't explode cats. It's way too difficult to coax them into the microwave - http://tinyurl.com/yp3hgr



More information about the Squeak-dev mailing list