Benjamin Kyan wrote:
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.
You script below behaves fine with the code in the latest development
branch. This code will make it into the Win32::GUI v1.04 release.
Watch this list for announcements (soon I hope).
Regards,
Rob.
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;
}
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/