Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

I would like to let users of software I develop to select file (or a directory - depending on situation) using GUI - on Win32 and MacOSX.
For Win32, one could code it using Win32::GUI - but may be there are already commandline utilities to do this (like gdialog, but not requiring an X server) - for Win32 and OSX? Do you know any?

Thanks in advance for your answers!

  • Comment on what is the easy GUI way to select file (or directory) on Win and MacOSX?

Replies are listed 'Best First'.
Re: what is the easy GUI way to select file (or directory) on Win and MacOSX?
by Corion (Patriarch) on Dec 08, 2006 at 20:22 UTC
      In OSX you'll still have to run X11.app if you use Tk. It should work fine on Win32.

      -----------------------------------
      Washizu
      Odd Man In: Guns and Game Theory

        Actaully there is quite a good port of tk for Aqua (native OSX window system). Older versions were quite buggy but I think it's good now.

        The standalone installer is only 2Mb. http://tcltkaqua.sourceforge.net/

Re: what is the easy GUI way to select file (or directory) on Win and MacOSX?
by hiseldl (Priest) on Dec 08, 2006 at 22:19 UTC

    Since you're using command line, I'd like to suggest a TUI interface...Curses Dev Kit. It's got a curses file-select widget.

    If you want to test it out, I suggest getting the cdk and the cdk-perl tarballs from the site link above and do not use the CPAN version, which is out of date. This does require that you have ncurses installed as well.

    HTH.

    --
    hiseldl
    What time is it? It's Camel Time!

Re: what is the easy GUI way to select file (or directory) on Win and MacOSX?
by wazoox (Prior) on Dec 09, 2006 at 09:34 UTC
    If you don't mind cracking a nut with a ten tons sledgehammer, WxPerl is the way to go. However you'll have to install several tens of megabytes of WxWidgets libraries to display a single file selector window :) But hey, it will works on Unix/Linux too ;)
Re: what is the easy GUI way to select file (or directory) on Win and MacOSX?
by Anonymous Monk on Dec 08, 2006 at 20:21 UTC
    I forgot to add - the software I develop is commandline-based - for batch job, it has no GUI currently..