Skip to content

Need defaultFolder: in SpDialog #1854

@Ducasse

Description

@Ducasse

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

pharo-project/pharo#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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions