Tk::FileSelect hangs on W98 root directory

Discussion in 'Perl Misc' started by Richard Trahan, Jun 7, 2005.

  1. I'm running ActiveState build 811 on W98. When using Tk::FileSelect,
    attempting to navigate to the root directory of any drive hangs the
    interpeter. There is no mention of this problem in this ng. Is anyone
    else experiencing this?
     
    Richard Trahan, Jun 7, 2005
    #1
    1. Advertising

  2. Richard Trahan <> wrote in news:DCepe.55175$NZ1.51778
    @fe09.lga:

    > I'm running ActiveState build 811 on W98. When using Tk::FileSelect,
    > attempting to navigate to the root directory of any drive hangs the
    > interpeter. There is no mention of this problem in this ng. Is anyone
    > else experiencing this?


    How about a short, complete script that still exhibits the problem so that
    others can try it out?

    Please read the posting guidelines for this group. They contain valuable
    information on how to help yourself as well as on how to help others help
    you.

    Sinan

    --
    A. Sinan Unur <>
    (reverse each component and remove .invalid for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
     
    A. Sinan Unur, Jun 7, 2005
    #2
    1. Advertising

  3. A. Sinan Unur wrote:
    > How about a short, complete script that still exhibits the problem so that
    > others can try it out?
    >

    use strict;
    use Tk;
    use Tk::FileSelect;

    our $mw = MainWindow->new;
    $mw->Button(
    -command => \&fs
    )->pack;

    MainLoop;

    sub fs
    {
    $mw->FileSelect(-directory => "c:/windows/temp")->Show;
    }

    The above program will allow me to click up to /windows, but if I go
    higher, the program hangs.
     
    Richard Trahan, Jun 7, 2005
    #3
  4. W. Citoan wrote:
    > Richard Trahan wrote:
    >
    >> I'm running ActiveState build 811 on W98. When using Tk::FileSelect,
    >> attempting to navigate to the root directory of any drive hangs the
    >> interpeter. There is no mention of this problem in this ng. Is anyone
    >> else experiencing this?

    >
    >
    > Your example code works fine for me (811 on XP). A quick Google search
    > shows that this appears to be a known problem on 98.
    > http://groups-beta.google.com/groups?q=perl windows 98 FileSelect
    > Look at the 1st and 2nd thread. The first thread suggests using
    > getOpenFile instead (which uses the standard Windows interface).
    >
    > - W. Citoan


    Thank you for your response. I will use that method, but there is still
    something wrong with it.

    The example shown in the Perl html page for getOpenFile shows a
    variable, $types, as a list of lists, and it works ok as shown, but if
    you reduce this list to a single line, you get a syntax error. Specifically:
    my $types = [
    ['Text Files', ['.txt','.text']],
    ];
    will not work. IMO, this is clearly a bug. Notice also that the syntax
    of $types is inconsistent with the description under the heading
    "Specifying File Patterns"; the $types example shows an extra level of
    list nesting.

    It's too bad they didn't fix FileSelect; getOpenFile is not quite the
    same because it isn't a widget and it allows the user to do things I
    don't want him/her to do, like delete files and create directories.

    In the context of the birth and death of galaxies, I suppose it's not
    that important.
     
    Richard Trahan, Jun 8, 2005
    #4
  5. Also, it ignores -initialdir.
     
    Richard Trahan, Jun 8, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    1,266
  2. Denise Mills

    C program works on W98 but not new WXP machine

    Denise Mills, Feb 3, 2004, in forum: C Programming
    Replies:
    4
    Views:
    385
    Darrell Grainger
    Feb 4, 2004
  3. Replies:
    1
    Views:
    282
    Will McGugan
    Aug 17, 2004
  4. Tim Shadel

    Gem hangs => TCPSocket.write hangs

    Tim Shadel, Jul 23, 2005, in forum: Ruby
    Replies:
    1
    Views:
    413
    Ville Mattila
    Jul 24, 2005
  5. MoshiachNow

    Tk-perl2exe FileSelect error

    MoshiachNow, Sep 25, 2006, in forum: Perl Misc
    Replies:
    5
    Views:
    368
    Ben Morrow
    Sep 25, 2006
Loading...

Share This Page