Events in win32com

Paul Moore paul.moore at uk.origin-it.com
Thu Dec 21 11:40:37 EST 2000


On Thu, 21 Dec 2000 05:59:32 +0100, Mark Hammond
<MarkH at ActiveState.com> wrote:
>Paul Moore wrote:
>> Can I rewrap it somehow, say as
>>   doc = DispatchWithEvents(ie.document, DocEvents)
>
>This is (should be) as simple as instantiating a sub-class of the makepy 
>generated event class, and passing the document.
>
>eg, something like:
>
>mod = EnsureModule(...)
>
>class MyEvents(mod.IDocumentEvents):
>   # your methods here....
>
>handler = MyEvents(ie.document)
>
># handler should start recieving events.

Wonderful! I'll try this later. I am continually impressed by how
powerful all of this stuff is. It's just a bit daunting knowing how to
find these things out... (But with the prompt and helpful responses
from you, that's not an issue, other than the fact that I start to
become a nuisance :-)

Happy Christmas,
Paul.




More information about the Python-list mailing list