Thread: Simple Com Event Handling for Multiple ComObjects
Simple Com Event Handling for Multiple
ComObjects
2006-06-27 14:57:02
Hi Mark,
Thanks for your kind remarks.
I saw that in PythonScript (ActiveX Script) you have implemented this
thing.
Can It be done in a Similar way for other Event Handingling?
Nawal
Mark Hammond wrote:
enfoldsystems.local">
I'm afraid you probably need to pull win32com.client.WithEvents apart and
manually setup your own event handler class. Different events do need
different functions (although it should be possible to add the same event
handler to 2 different event sources.
Cheers,
Mark
In activeX Scripting, I can Create Two Button Events Like
OnButton1()
OnButton2()
In Normal Python Com Event Handling: I have to declare two classes
class ButtonEvent1
OnButton()
...
class ButtonEvent2
OnButton()
...
and then attach this event handler to the Com Objects. Is there any
way I can achieve it
just like the ActiveX Scripting without creating more
EventHandlerClasses?
Thanks in advance.
Nawal
-------------------------------------------------------------