Searching for the call of a FileDialog
I would like to ask the user for a file name in Pharo 4.0
Through the spotter I found class
FileDialogWindow
with a method
answerFileName
Looking for the senders of #answerFileName I get to class
UITheme
where it is called in the method
chooseFileNameIn: aThemedMorph
title: title
extensions: exts
path: path preview: preview
And from there I come to class
TEasilyThemed
with the method
chooseFileName: title extensions: exts path: path preview: preview
From there finally I get to class
WidgetExamples class >> exampleDialogs
And then I have the call
WidgetExamples exampleBuilder
chooseFileName: 'Pick a file name'
extensions: nil path: nil preview: nil.
However a print it
of this expression does not give back a file name.
Question
What is the regular way of calling a file dialog?
Supplementary question after answers
Two classes are mentioned providing this service.
- UIManager
- UITheme
UIManager comment
UIManager is a dispatcher for various UI requests.
UITheme comment
Common superclass for User Interface themes. Provides methods for creating new morphs in a standard way, various "services" like a file dialog, message dialogs etc. and also methods for customising aspects of the appearance of various morphs. Though conceptually abstract, no code is "missing". Subclasses, therefore, should override the aspects they wish to change.
What is the difference between this two approaches?