[Pharo-users] Pharo 7: Problems with the new file chooser UI

Sven Van Caekenberghe sven at stfx.eu
Mon Feb 18 17:13:39 EST 2019


Are you really sure ? It works for me, Pharo 7.0.1 macOS.

> On 18 Feb 2019, at 22:57, Offray Vladimir Luna Cárdenas <offray.luna at mutabit.com> wrote:
> 
> Hi,
> 
> 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:
> 
> [1]~~~~
> 
> (FileLocator documents / 'test.ston') ensureCreateFile  writeStreamDo:  [:stream | STON put: (Rectangle center: 10 at 10 extent: 100 at 50) onStream: stream ].
> 
> ~~~~
> 
> You will get a file on your Documents folder called test.ston, but If I choose that file using:
> 
> [2]~~~~
> 
> file := UIManager default 
>                         chooseExistingFileReference:'Choose a file'
>                         extensions: #('ston')
>                         path: FileLocator documents.
> 
> ~~~~
> 
> and I choose the "test.ston" file created at [1], 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?
> 
> Thanks,
> 
> Offray
> 




More information about the Pharo-users mailing list