[python-win32] dispatchwithevents not catching events

Jeff Peery jeffpeery at yahoo.com
Wed Sep 2 20:42:11 CEST 2009


Hello,
I'm having trouble catching events when I use dispatchwithevents.
 
I have a wxapp that uses com and I catch OPCDataChangeEvents (OPC, OLE for process automation) from an opc server. things work quite well in this case, i.e., I am able to catch the data change events. 
 
The problem happened when I separated my logic from the wxGUI (I'm trying to keep my code clean and maintainable). So now I have a wxApp, within the wxApp is a thread that runs my logic, and within this thread I try to catch the OPCDataChangeEvents. In this case, it appears that the OPC thread is working properly, ie. if I test writeItem or readItem or connect or disconnect everything works well... until I try to catch the datachange events. I don't seem to catch them in this configuration. 
 
What might be happening here? Should this work? If so how do I fix this?
 
thanks,
Jeff
 


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20090902/2d547817/attachment.htm>


More information about the python-win32 mailing list