[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
+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@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Guillermo Polito [guillermopolito@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
There is currently MorphicUIManager>>chooseFullFileNameMatching:label: Feel free to add in ones that take a path/preview if necessary. Regards, Gary ----- Original Message ----- From: Guillermo Polito To: Pharo Development Sent: Saturday, June 25, 2011 9:04 PM 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
participants (3)
-
Gary Chambers -
Guillermo Polito -
Schwab,Wilhelm K