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

David T. Lewis lewis at mail.msen.com
Sat Nov 11 02:04:25 UTC 2017


By the way I should say that I meant this as constructive input from a user's
first impression point of view, I have not actually looked at any of the code.
I just pasted in Tim's getFileNameFromUserSuggesting snippet to see what it looks
like when I do an image "save as". It looks good, and I am just trying to offer my
dumb-user first reactions.

Dave

On Fri, Nov 10, 2017 at 08:53:59PM -0500, David T. Lewis 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. 
> 
> 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.
> 
> 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.
> 
> 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".
> 
> Dave
> 
> 
> On Fri, Nov 10, 2017 at 04:39:46PM -0800, tim Rowledge wrote:
> > And now the dialogs are in the latest packages *except* for the hooking up to saveAs???
> > 
> > To try that out, simply edit
> > 
> > SmalltalkImage>getFileNameFromUserSuggesting: aName
> > 	"Ask the user for a new image name"
> > 	| newName |
> > 	newName := UIManager default
> > 		filenameSaverRequest: 'New File Name?' translated
> > 		initialAnswer: aName.
> > 	newName ifNil: [^nil].
> > 	((FileDirectory default fileOrDirectoryExists: (self fullNameForImageNamed: newName)) or:
> > 	 [FileDirectory default fileOrDirectoryExists: (self fullNameForChangesNamed: newName)]) ifTrue: [
> > 		(self confirm: ('{1} already exists. Overwrite?' translated format: {newName})) ifFalse: [^nil]].
> > 	^newName
> > 
> > 
> > tim
> > --
> > tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> > Fractured Idiom:- FUI GENERIS - What's mine is mine
> > 
> > 
> > 
> 


More information about the Squeak-dev mailing list