Has anyone else encountered issues with registering the DocumentComplete
event with WebBrowser2 in Win32::GUI::AxWindow?  For me, the following
code sample is causing the Perl Interpreter (ActivePerl 5.8.8) to crash
every time the DocumentComplete event is fired.  I can tell that the
crash is happening when the event is fired (as opposed to when it gets
registered against), because WebBrowser2 control successfully navigates to
Google prior to the crash.  I tried the NavigateComplete2 event, as well
as several different websites, with the same result.  On the other hand,
registering against the StatusTextChange event seemed to work just fine.
Also, registering against the NavigateComplete event on WebBrowser1
seemed to work, as well.

My environment is as follows:

  Windows XP - Home Edition (5.1.2600)
  ActivePerl 5.8.8
  Win32::GUI 1.03
  Win32::GUI:AxWindow 0.07 (I used the 5.8 PPM)
  Internet Explorer 6.0.2900

Note: The Google.pl script in the Win32-GUI-AxWindow-SRC Samples fails
in the same manner for me, as well.


Best Regards,
Benjamin Kyan

# -----------------------------------------------------------------------

use Win32::GUI;
use Win32::GUI::AxWindow;

$Window = new Win32::GUI::Window
(
   -title    => "Win32::GUI::AxWindow Test",
   -pos     => [100, 100],
   -size    => [400, 400],
   -name     => "Window",
) or die "new Window";

$Control = new Win32::GUI::AxWindow
(
   -parent  => $Window,
   -name    => "Control",
   -pos     => [0, 0],
   -size    => [400, 400],
   -control => "Shell.Explorer.2",
) or die "new Control";

$Control->RegisterEvent("DocumentComplete", sub { print "ok\n"; } );
$Control->CallMethod("Navigate", 'http://www.google.com/');
$Window->Show();
Win32::GUI::Dialog();

sub Window_Terminate
{
   return -1;
}


Reply via email to