Perl/Tk On Win32: Error when I run FileDialog example 
Author Message
 Perl/Tk On Win32: Error when I run FileDialog example

Platform: Win32
Perl version: 5.004_02
Perl/Tk version: 402.002

When I try to run the FileDialog example program that comes with the module on either WinNT or Win95, I get the following

C:\perlprog>perl Invalid master window .filedialog
for filedialog at C:\PERL\lib\site/Tk/ line 34.
at C:\PERL\lib\site/Tk/ line 429

I've been through and, and I'm unable to
determine the cause of this error.  Has anyone seen it or know some
trick to working with this widget under Win32?

I've included the example program below if, for some reason, you don't
have it.


Troy Denkinger

-------------->FileDialog example<-----------------

#!/usr/local/bin/perl -w

use Tk;
use Tk::FileDialog;
use strict;

my($main) = MainWindow->new;
my($Horiz) = 1;
my($LoadDialog) = $main->FileDialog(-Title =>'This is my title',
                                    -Create => 0);
$LoadDialog->configure(-FPat => '*pl',
                      -ShowAll => 'NO');
$main->Entry(-textvariable => \$fname)
       ->pack(-expand => 1,
              -fill => 'x');
$main->Button(-text => 'Kick me!',
             -command => sub {
                 $fname = $LoadDialog->Show(-Horiz => $Horiz);
                 if (!defined($fname)) {
                     $fname = "Fine,Cancel, but no Chdir anymore!!!";
                     $LoadDialog->configure(-Chdir =>'NO');
       ->pack(-expand => 1,
              -fill => 'x');
$main->Checkbutton(-text => 'Horizontal',
                  -variable => \$Horiz)
       ->pack(-expand => 1,
              -fill => 'x');
$main->Button(-text => 'Exit',
             -command => sub {
       ->pack(-expand => 1,
              -fill => 'x');
print "Exit Stage right!\n";

Fri, 16 Jun 2000 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. RegExp Error Under UNIX PERL Runs Under Win32 PERL

2. Errors running Randal and Damian's Parse::RecDescent examples

3. Win32::DDE::Client strange behavior, perl gives run-time error

4. Win32::DDE::Client strange behavior, perl run-time error

5. Tk::FileDialog Bug Report (Newbie to the submission process of CPAN)

6. Annoyance with Tk::FileDialog in MSWindows

7. two short questions on Tk::FileDialog

8. Help: installing Tk::FileDialog on WinNT

9. Problems With FileDialog Under Win32

10. FileDialog (and others) on Win32

11. Tk run error

12. What do these error messages mean in Tk::FileDialog and Tk::Columns?


Powered by phpBB® Forum Software