Answered the question myself, I think.

Attached is an example that is handling the 'onreadychangeevent' in the
MSXML 40 parser.

The bottom line is that the Win32::OLE->WithEvents method was able to
register the event handler.  Its unclear to me how it knows to register for
a specific event, so I guess it is registering for all of the com object's
events in this example.  The script is just a demonstartion that I'm working
through in trying to understand how to use MSXML with perl.

Hope this helps others who are trying to do the same.

-Craig

----- Original Message -----
From: "Craig Dayton" <[EMAIL PROTECTED]>
To: "'Craig Dayton'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Friday, August 16, 2002 7:07 AM
Subject: RE: Proper setting for Event Handle Ref


>
> I've attached an example of the test script. For some reason the orginal
> post wouldn't send when the script was cut&pasted into the web email
> client.
>
> -Craig
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On Behalf Of
> Craig Dayton
> Sent: Thursday, August 15, 2002 5:33 PM
> To: [EMAIL PROTECTED]
> Subject: Proper setting for Event Handle Ref
>
>
>
> I've been attempting to get the statement below to work without much
> success.
>
> The 'onreadystatechange' is documented as being a reference to an event
> handler function.
>
> $xmlDOC->{onreadystatechange} = &$subREF;
>
> When the script below is executed, the following output is generated.
> I've tried annoymous sub too.
>
> If anyone could push me into the right direction to solve the problem, I
> be very grateful.
>
> Thanks, Craig
>
> = output generated
>
> COMPLETED
> Win32::OLE(0.1502) error 0x80020005: "Type mismatch"
> in PROPERTYPUT "onreadystatechange" at
> C:\Utopia\scripts\perl\msxml40_dev\589x\chapter02\async_test.pl line 15
>
> === end of output
>
>
>
> _______________________________________________
> Perl-Win32-Admin mailing list [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>

Attachment: async_test.pl
Description: Binary data

Reply via email to