[python-win32] Re: COM Events

Christian Junker christian at TreesforLife.org
Sat Jul 10 04:13:21 CEST 2004


Very interesting thread, I am trying something similiar for OpenOffice.org, which has a quite similiar listener system.
If someone has ever written a listener or handler for OpenOffice.org via COM, please let me know, I am digging in the dark.

Best regards
Christian Junker


> -----Original Message-----
> From: Thomas Heller [mailto:theller at python.net]
> Sent: Friday, July 09, 2004 8:04 AM
> To: python-win32 at python.org
> Subject: [python-win32] Re: COM Events
> 
> 
> Tim Golden <tim.golden at viacom-outdoor.co.uk> writes:
> 
> > | Great that seems to work - but I only get my parent object in 
> > | this way:
> > | 
> > | agent = win32com.client.DispatchWithEvents 
> > | ("Agent.Control.2", AgentEvents)
> > | 
> > | What if I then get other objects as properties of this object -
> > | E.g.
> > | """
> > | SomethingElse = agent.Another
> > | """
> > | 
> > | And this object/interface has events too...
> >
> > I'm going horribly out of my depth (or, in fact, out of my 
> shallows) now,
> > but I have an idea that you can pass not just a class string, but
> > a dispatched object in as the first parameter to DispatchWithEvents.
> > ie you can do 
> >
> > a = win32com.client.DispatchWithEvents ("x.y", xy_events_class)
> > b = win32com.client.DispatchWithEvents (a.z, az_events_class)
> >
> > I could very well be wrong, having never tried it.
> 
> Hm, isn't that what win32com.client.WithEvents is for?  At 
> least the OP
> should also look into that too.
> 
> Thomas
> 
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
> 


More information about the Python-win32 mailing list