Hello Chris,
thanks for your prompt reply.
(main thread)
progressdlg, which i want to update
EVT_BUTTON(self, 9999, self.OnUpdateProgress)
def OnUpdateProgress ...
print "updating"
Here you've connected a button event from a Button with an id of 9999 to your OnUpdateProgress() method
I see; it's surly not optimal; but I want to implement this application
from an original wxwindows app; and that was working.
(worker thread is created with import thread; as in wxpython thread example)
def NotifyProgress(self):
event = wxCommandEvent ()
event.m_eventType = wxEVT_COMMAND_LISTBOX_SELECTED
event.m_id = 9999
wxPostEvent(self.m_pWndProgress, event)
print "sending"
Here you are creating a custom CommandEvent, of the type:
wxEVT_COMMAND_LISTBOX_SELECTED
It was a typing mistake. It was from a testing source ...
and posting it to the window: self.m_pWndProgress
self.m_pWndProgress is valid, "sending" is shown, but never "updating"
you're not going to catch a wxEVT_COMMAND_LISTBOX_SELECTED event with an EVT_BUTTON call
of course
The easiest way to do this is to use wxCAllAfter(), but if that won't work for you, you should probably create your own custom event, and then bind it with your own custom event binding function, as per:
I want to use that event from different source files; that is another difficulty [for my spare experience :)] i don't know, how to achieve this :-
thanks, looks interesting.
the main interesting issue for me is, where the event "vanishes" and why;
and how to capture or monitoring this.
It's also possible to to what you seem to be trying to do, and create an event of an existing type, but it should be a button event, in this case, and I probably wouldn't do that. Clicking on a button is a different thing that whatever your thread is doing, even if you want them to call the same method.
I was aware of it; naturally it is not reasonable; but it shouldn't make no difference, i think.
Make sure you read:
As well.
Thank you very much for your effort.
···
scrutinizer@gmx.at wrote: