[python-win32] COM Event Question
Mark Hammond
mhammond@skippinet.com.au
Mon, 10 Mar 2003 10:45:49 +1100
> Using VB, I can see both OPCServer and OPCGroup events. The following
> two programs should both print each time a "Data Change" or
> "Server Shutdown" event occurs.
It is not clear to me that you have 2 event classes here - is it one event
class for both objects?
ie, I would have expected to see *two* event classes in your Python code.
> groups=OPC.OPCGroups
> group=groups.Add('Group 1')
You can use DispatchWithEvents() on "group" here. Eg, adding:
group = DispatchWithEvents(group, ClassName)
would convert it into an event source. However, as I mentioned, I would
generally expect to see 2 event classes - one for OPC, and one for group.
Mark.