Search call FileDialog
I would like to ask the user to specify a file name in Pharo 4.0
Through the registrar, I found a class
FileDialogWindow
using method
answerFileName
Looking for senders #answerFileName I get a class
UITheme
where is it called in the method
chooseFileNameIn: aThemedMorph title: title extensions: exts path: path preview: preview
And from there I come to class
TEasilyThemed
using method
chooseFileName: title extensions: exts path: path preview: preview
From there, finally, I will move on to the class
WidgetExamples class >> exampleDialogs
And then I have a call
WidgetExamples exampleBuilder chooseFileName: 'Pick a file name' extensions: nil path: nil preview: nil.
However, a print it this expression does not return the file name.
Question
What is the usual way to invoke a file dialog box?
Additional question after answers
Two classes providing this service are indicated.
Comment by UIManager
UIManager is the dispatcher for various user interface requests.
Comment by UITheme
General superclass for user interface themes. Provides methods for creating new morphs in a standard way, various "services", such as a dialog with files, message dialogs, etc., as well as methods for configuring aspects of the appearance of various morphs. Although conceptually abstract, no code is "missing." Therefore, subclasses must redefine the aspects they want to change.
What is the difference between these two approaches?