Re: [Pharo-dev] Streams and FileDialog in Pharo 6 and 7

2018-11-11 Thread Denis Kudriashov
пн, 29 окт. 2018 г. в 10:07, Guillermo Polito : > Well, there are still variants > - chooseFile* > - fileOpen* > - fileSave* > - chooseFileName* > - chooseFullFileName* > > I prefered rather to be explicit and to avoid confusion with the old API > (which I deprecated, not removed!) > Ok. For

Re: [Pharo-dev] Streams and FileDialog in Pharo 6 and 7

2018-10-29 Thread Guillermo Polito
Well, there are still variants - chooseFile* - fileOpen* - fileSave* - chooseFileName* - chooseFullFileName* I prefered rather to be explicit and to avoid confusion with the old API (which I deprecated, not removed!) On Sat, Oct 27, 2018 at 2:42 PM Denis Kudriashov wrote: > What about diff

Re: [Pharo-dev] Streams and FileDialog in Pharo 6 and 7

2018-10-27 Thread Denis Kudriashov
What about different names? UIManager default chooseFileIn: aFileReference withExtensions: #() title: 'title' UIManager default chooseFileForSaveIn: aFileReference withExtensions: #() title: 'title' We can just expect file references because it is what is exposed t

Re: [Pharo-dev] Streams and FileDialog in Pharo 6 and 7

2018-10-26 Thread Stephane Ducasse
go go go! FileReference! On Fri, Oct 26, 2018 at 3:12 PM Guillermo Polito wrote: > Ok, so can we agree on deprecating the non compatible methods and redirect > the user to the new ones? > > To me, the problem with returning a stream is that from a user perspective > you don't know: > - is the f

Re: [Pharo-dev] Streams and FileDialog in Pharo 6 and 7

2018-10-26 Thread Sven Van Caekenberghe
Looks fine. > On 26 Oct 2018, at 17:31, Guillermo Polito wrote: > > Hi all, > > I've proposed a PR with some cleanups in this respect > > https://github.com/pharo-project/pharo/pull/1941 > > This is the proposed replacement API that returns file references instead of > streams or file names.

Re: [Pharo-dev] Streams and FileDialog in Pharo 6 and 7

2018-10-26 Thread Guillermo Polito
Hi all, I've proposed a PR with some cleanups in this respect https://github.com/pharo-project/pharo/pull/1941 This is the proposed replacement API that returns file references instead of streams or file names. "Get existing file reference" UIManager default chooseExistingFileReference: 'title'

Re: [Pharo-dev] Streams and FileDialog in Pharo 6 and 7

2018-10-26 Thread Sven Van Caekenberghe
> On 26 Oct 2018, at 15:11, Guillermo Polito wrote: > > Ok, so can we agree on deprecating the non compatible methods and redirect > the user to the new ones? > > To me, the problem with returning a stream is that from a user perspective > you don't know: > - is the file encoded or binary

Re: [Pharo-dev] Streams and FileDialog in Pharo 6 and 7

2018-10-26 Thread Guillermo Polito
Ok, so can we agree on deprecating the non compatible methods and redirect the user to the new ones? To me, the problem with returning a stream is that from a user perspective you don't know: - is the file encoded or binary - if it is encoded, in which encoding? - if i receive an open file stre

Re: [Pharo-dev] Streams and FileDialog in Pharo 6 and 7

2018-09-06 Thread Peter Uhnak
> It should return a FileReference, not an open stream. I believe there are methods that do that. There are different APIs for that. fileOpen*, as the name implies, _opens the file_ and returns the stream. (I think this should be the case for fileSave*) If you want file reference, then you can

Re: [Pharo-dev] Streams and FileDialog in Pharo 6 and 7

2018-09-06 Thread Sven Van Caekenberghe
> On 6 Sep 2018, at 21:37, Torsten Bergmann wrote: > > Hi, > > A question to those who worked on the new streams for Pharo 7: > > > In PHARO 6 I used the following expression to open a file dialog and let the > user choose > a binary file: > >s := UITheme builder fileOpen: 'Choose a

[Pharo-dev] Streams and FileDialog in Pharo 6 and 7

2018-09-06 Thread Torsten Bergmann
Hi, A question to those who worked on the new streams for Pharo 7: In PHARO 6 I used the following expression to open a file dialog and let the user choose a binary file: s := UITheme builder fileOpen: 'Choose a file' extensions: #('exe'). This returned - either nil (when file dialog