Hi,
I've the following problem.

class AppMonitor:
    def __init__(self, logType="LocalFile"):
        self.eventLog = Logging.EventLog(logType)
.
.
.
class WebBrowserMonitor(AppMonitor):
    def __init__(self):
        AppMonitor.__init__(self)
.
.
.
class IExplorerMonitor(WebBrowserMonitor):
""" Implements event handlers like OnLinkFollowed( ) ... for IE """
    def __init__(self):
        WebBrowserMonitor.__init__(self)
.
.
.
class IexplorerApp:
        def __init__(self,appMonitorClass):
        """ appMonitorClass is an instance of IExplorerMonitor """
                self.PROGID = "InternetExplorer.Application"
                self.appMonitorClass = appMonitorClass
                win32com.client.gencache.EnsureDispatch(self.PROGID)
                self.appCOMObj =
win32com.client.DispatchWithEvents(self.PROGID, appMonitorClass.__class__)


The code for DispatchWithEvents creates a new object which inherits from
three classes, one of which is
the class IexplorerMonitor passed as the second argument. This new object
handles all the events generated by IE.
I expected that this new object would call the __init__ method of
IExplorerMonitor (which eventually calls the
AppMonitor's __init__ method, in which the attribute self.eventlog is
initialized).
But the code for DispatchWithEvents doesn't seem to do this. So, the event
handlers in IExplorerMonitor doesn't see the
initialized value of self.eventlog

Is this a bug in DispatchWithEvents ?
Is there a fix ?

Thanks in advance,
RathnaPrabhu


===================================================
RathnaPrabhu Rajendran,
www.cs.arizona.edu/people/prabhu
Graduate Associate, Teaching
University of Arizona
Tucson
USA
===================================================




_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython

Reply via email to