I am implementing a threaded worker thread to work with my UI, and to communicate status back I’m using wx.PyEvent. However, I am having difficulties setting properties to the event.
Brief snippet:
EVT_BLIZZ_RESULT_ID = wx.NewId()
class BlizzEvent(wx.PyEvent):
def __init__(self, eventData):
wx.PyEvent.__init__(self, id=EVT_BLIZZ_RESULT_ID)
self.SetEventType(EVT_BLIZZ_RESULT_ID)
self.data = eventData
print()
However, if I set a breakpoint at print(), what I see is: eventData is populated as expected, but self.data does NOT exist. What am I missing? Did wx.PyEvent change? I’m sure I’m just missing something on setting properties.
wx.PostEvent() does post this event to the UI frame, but minus self.data.