[Pharo-users] Pharo 7: Problems with the new file chooser UI
Offray Vladimir Luna Cárdenas
offray.luna at mutabit.com
Mon Feb 18 16:57:19 EST 2019
While I'm migrating Grafoscopio to Pharo 7 I get a deprecation warning
telling me that I need to change the previous code for choosing a file
from the UI, but now when I proceed as advised (using
|chooseExistingFileReference: title extensions: exts path: path|). It
returns a |FileReference| but all the paths are referred to the place
where the running image is located, instead of the place where the
selected file is located.
For example if you run:
(FileLocator documents / 'test.ston') ensureCreateFile writeStreamDo:
[:stream | STON put: (Rectangle center: 10 at 10 extent: 100 at 50) onStream:
You will get a file on your Documents folder called test.ston, but If I
choose that file using:
file := UIManager default
chooseExistingFileReference:'Choose a file'
path: FileLocator documents.
and I choose the "test.ston" file created at , Pharo tells me that
the file is located in the same place as the running image, instead on
my Documents folder.
Am I missing something?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-users