Spec
Spec copied to clipboard
Need defaultFolder: in SpDialog
Hi
I wanted to fix the fact that when we use directory in epicea it opens on /users/ducasse instead of the image location so the user has to know that the pharo files are somewhere in the disc…. Basic UX I would say
https://github.com/pharo-project/pharo/issues/17381
Just one year ago…
So now I decided to fix it
I see the following
selectDirectory
(self application selectDirectoryTitle: self directory basename)
ifNotNil: [ :selectedDirectory | self directory: selectedDirectory ]
where
(self application selectDirectoryTitle: self directory basename)
open the file browser in my home :(((((
selectDirectoryTitle: aString
^ self newOpenFile title: aString;
beOpenDirectory; openModal
newOpenFile
^ SpFileDialog newApplication: self
I do not understand the relationship between SpFileDialog and the SpFileDialogPresenter Because it lStFileDialogPresenter has a defaultFolder: method and it is doing what I want.
StFileDialogPresenter new
defaultFolder: FileLocator image parent asFileReference;
openModal
Is there a way to specify the location in the SpFileDialog?
is the way
StOpenFileOrDirectoryPresenter new
title: 'Select a change file';
defaultFolder: FileLocator image parent asFileReference;
openModal