Your code worked for me.

When you call BrowseForFolder from Tk, you are going through quite a few
different levels of code before the dialog box actually appears on the
screen.  Tk executes Tk::Win32::FileOp::BrowseForFolder which is a wrapper
around Win32::FileOp::BrowseForFolder.  Win32::FileOp::BrowseForFolder is
tied via the Lazy module to Win32::API.  Win32::API executes the
SHBrowseForFolder functions in the system dll shell32.dll.  

To find out what is causing the problem you will need to remove one or two
layers at a time until the problem goes away.  First try calling Browse for
folder directly from Win32::FileOp.  If the problem is still there, try
calling the SHBrowseForFolder directly from Win32::API (I think that can be
done).  If the problem is still there, can you create a BrowseForFolder
dialog from any other application?  (pressing the browse button in the "Find
File or Folder" dialog will create the BrowseForFolder dialog)

Once you find the guilty party re-install it and see if the problem goes
away



wantor

> -----Original Message-----
> From: Tony Auerbach [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 10, 2000 8:01 PM
> To: Perl-Win32-Users Mailing List
> Subject: BrowseForFolder trouble
> 
> 
> I'm trying to use the use the BrowseForFolder fucntion in the 
> Tk::Win32::FileOp package and perl is crashing.  It's the 
> usual Windows 
> "illegal operation" message and the details begin with "PERL 
> caused an 
> invalid page fault in module SHELL32.DLL at 016f:7fd07775."
> 
> The OpenDialog fuction works fine.  Is anyone successfully using 
> BrowseForFolder?  Is it my code or a bug in the module?  Here 
> is a sample 
> of code that will always crash.
> 
> use Tk;
> use Tk::Win32::FileOp;
> 
> $mw = new MainWindow;
> 
> $mw->Button(-text => 'Dir', 
>             -command => sub { 
>               $newdir = $mw->BrowseForFolder();
>               print "$newdir\n";
>               }
>               )->pack;
> 
> MainLoop;
> 
> Thanks,
> Tony
> 
> ---
> You are currently subscribed to perl-win32-users as: 
> [EMAIL PROTECTED]
> To unsubscribe, forward this message to
>          [EMAIL PROTECTED]
> For non-automated Mailing List support, send email to  
>          [EMAIL PROTECTED]
> 

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to