[BUG][FIX] MVC: File Selection Dialog (shows another bug)

Boris Gaertner Boris.Gaertner at gmx.net
Wed Aug 27 21:00:32 UTC 2003


From: Magistrello Alejandro (SFA) <magistra at TELEFONICA.COM.AR>
To: <squeak-dev at lists.squeakfoundation.org>

> [..] 
> >The dialog has some flaws:
> >1. It is always opened in FileDirectory default. The directory
> >    that is given as the argument of  oldFileFrom:  in the example
> >   above is simply ignored.
> this works
> 
> >2. The dialog is displayed in deemphasized mode; the selections
> >   are therefore not shown.
> don't know how to see this

Please try this (in Squeak 3.4)

(PluggableFileList oldFileMenu: (FileDirectory default))
      startUpWithCaption: 'Select a File, please:'

To the left, you see the name of your working directory, to
the right a list of the files in your working directory.
Regrettably, the working directory is not shown selected.
I think it should be shown selected.
In  ModalSystemWindowView>>doModalDialog,
you find
   view display.
When you replace this with
  view displayEmphasized.
the initial selection in the directory list is shown.


> 
> >3. When you try to bring up the menu of the file name list view,
> >   you run into the debugger. This bug is a new one, it came with
> >   the introduction of service entries.
> this works iff you haven't selected a file, but if you do you'l get an
> error.
> attached is one intended fix, that depends on yours, please take a look.
> 
Thank you for finding this!. Seemingly I fixed only what I needed
for my work, and I never tried the activity that you tried. Your
fix is a real improvement. I added it to the attached change set.

I tried to execute
 (PluggableFileList oldFileMenu: (FileDirectory on: 'c:\windows\fonts'))
      startUpWithCaption: 'Select a File, please:'
in a Mrophic project and receive a strange effect, that I cannot quickly
fix:
I put that statement into a workspace that I place more or less centered
on the screen. When I execute the statement, the selection dialog is
displayed above the workspace. This looks good, but as soon as a
call up one of the menues of the dialog, the selected text of the workspace
comes into the foreground.
I think that in  PluggableFileList>>open one should have something like
 Smalltalk isMorphic
    ifTrue: [<...>]
    ifFalse: [<...>]

I tried to do that, the result can be found in MorphicFSD.1.cs
In SystemWindow>>update:  I added a reaction to the
message #close.
In PluggableFileList>>openAsMorphLasbel:inWorld:
I added an event loop. The condition of the loop uses the
fact that the model of a SystemWindow is niled when the
window is deleted. 
I am not very experienced user of the Morphic interface,
so comments are highly wellcome.


Greetings,
Boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FileSelectionDialog.6.cs
Type: application/octet-stream
Size: 3160 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030827/4af5de74/FileSelectionDialog.6.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MorphicFSD.1.cs
Type: application/octet-stream
Size: 3425 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030827/4af5de74/MorphicFSD.1.obj


More information about the Squeak-dev mailing list