Mon Dec 13 12:58:47 2010: Request 63882 was acted upon.
Transaction: Ticket created by [email protected]
Queue: Win32-OLE
Subject: Problem with tk_getopenfile and Win32::OLE::Const
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: [email protected]
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=63882 >
Dear Sir or Madam,
I am encountering an issue with tk_getopenfile when Win32::OLE::Const is
present in the file even though it may be in a subroutine. I am using
ActiveState PERL 5.12 on a WINDOWS XP SP3 box. When the Win32::OLE::Const is
present the Tk_getopenfile does not reload properly when choosing a different
file type from the pull down file type box. The code will demonstrate the issue
or at least it did on my box.
The code below should work properly...
use 5.010;
use strict;
use warnings;
use Tkx;
use strict ;
use Win32::OLE;
#use Win32::OLE::Const 'Microsoft Office.* Object Library';
#use Win32::OLE::Const 'Microsoft Word';
use Win32::Process ; # Launch a Windows program
my $types = [ ['CSV files', ['.csv']],
['ZIP files', ['.zip']],
['ALL files', ['*']],
];
my $filelist = Tkx::tk___getOpenFile(-multiple => 1, -title => "Open a CSV
File",
-defaultextension => '.csv',
-initialfile => '*.csv',
-filetypes => $types,
-initialdir => 'c:\temp',
);
Tkx::MainLoop();
exit;
But if I uncomment one of the lines containing Win32::OLE::Const as in the next
example the reloads to not occur properly when choosing a different file type...
use 5.010;
use strict;
use warnings;
use Tkx;
use strict ;
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Office.* Object Library';
#use Win32::OLE::Const 'Microsoft Word';
use Win32::Process ; # Launch a Windows program
my $types = [ ['CSV files', ['.csv']],
['ZIP files', ['.zip']],
['ALL files', ['*']],
];
my $filelist = Tkx::tk___getOpenFile(-multiple => 1, -title => "Open a CSV
File",
-defaultextension => '.csv',
-initialfile => '*.csv',
-filetypes => $types,
-initialdir => 'c:\temp',
);
Tkx::MainLoop();
exit;
I look forward to hearing from you.
Thank you,
gary