Win32: ByRef equivalent in pythoncom for function callbacks?

Mike Fletcher mfletch at tpresence.com
Wed Oct 4 09:02:34 EDT 2000


Sorry for the delay in response, I've been tooling around with various other
problems, and only got back to this sub-project this evening.  Good news is,
I did get DOM events working, bad news is, it's a bit of a hack, and still
requires makepy support for defining the interfaces (at least, that's what I
used to define it).

What I did was strip the particular event handler class out of the mshtml
Makepy interface file (which will not import, likely because it's 1.9 MB),
and use it as an event sink for the IHTMLWindow2 object returned from
ie.Document.parentWindow.  That gives me the event callbacks (it appears
this should work for any DOM event), and I can use the DOM's
attributes/properties to get the current scroll position (which is a strange
way to access it, but I can't seem to find any other way to get scroll
position).

Thanks for the help, enjoy yourself,
Mike


-----Original Message-----
From: Mark Hammond [mailto:MarkH at ActiveState.com]
Sent: Monday, September 25, 2000 8:32 AM
To: python-list at python.org
Subject: Re: Win32: ByRef equivalent in pythoncom for function
callbacks?


"Mike Fletcher" <mfletch at tpresence.com> wrote in message
news:mailman.969879038.18222.python-list at python.org...

> self.ie.Document.documentElement.attachEvent(

It looks like you are trying to use the DOM event mechanism.  I doubt
this will work.

See the docstrings for win32com.client.DispatchWithEvents, or the
newsgroup for other events discussions.  However, note there is an
outstanding bug, in that some events go missing.  This has also been
reported here, and is also in the ActivePython bug list.

Mark.



-- 
http://www.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list