[Pharo-project] UIManager>>chooseFileName* flavour to get full path?

Schwab,Wilhelm K bschwab at anest.ufl.edu
Sun Jun 26 09:57:07 EDT 2011


+1 about answering the full path; that should be the default.  Attached is (beware a Linux bias) a Pharo-specific recreation of Dolphin's File class.  One can readily quibble about the design, which puts file name manipulation methods on the class-side of File.  But, that's how Dolphin does it, and I have a lot of Dolphin code that needs a home on Linux, so I wasn't interested in purity - I just wanted the stuff to work :)  I had to change separators and lose drive letters, but it has overall worked fairly well.

FWIW (mostly to Dolphin users), I added #path to DirectoryEntry (it answers self fullName), for compatibility with Dolphin's WIN32_FIND_DATA; then DirectoryEntry takes over - or so it seems looking at my code.

Bill


________________________________________
From: pharo-project-bounces at lists.gforge.inria.fr [pharo-project-bounces at lists.gforge.inria.fr] On Behalf Of Guillermo Polito [guillermopolito at gmail.com]
Sent: Saturday, June 25, 2011 4:04 PM
To: Pharo Development
Subject: [Pharo-project] UIManager>>chooseFileName* flavour to get full path?

Hi!

I was wondering why

UITheme>>chooseFileNameIn: title: patterns: path: preview:

and

UITheme>>chooseFileNameIn: title: extensions: path: preview:

do

fd := FileDialogWindow basicNew
        previewType: preview;
        initialize;
        title: title;
        answerFileName.

And actually there is no variant using answerPathName what is a bit more useful because it answers the entire path to the selected file...

Thanks!
Guille
-------------- next part --------------
A non-text attachment was scrubbed...
Name: File.st
Type: application/octet-stream
Size: 6770 bytes
Desc: File.st
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20110626/87f1c6b6/attachment.st>


More information about the Pharo-dev mailing list