I experienced program crashes when moving from
wxMSW 2.3.2 to 2.3.3 (CVS). I found that there was a
problem with my wxView event handling. As I'm relaying
some events to child windows in MyView::ProcessEvent
(), there is a chance that events are processed twice
due to the command event travelling feature (because
the child window is somewhere in the chain of the
wxDocMDIChildFrame), and I found that this can cause
program crash if wxID_EXIT is handled twice.
At first I tried to fix the problem within my
MyView::ProcessEvent(), but then I found it is much
easier and cleaner to fix it in the wxDocMDIChildFrame()
itself by blocking an event if it appears there for the
second time.
As I found that understanding the effects of relaying
events in the doc/view framework requires lots of code
reading and analyis, I think with this patch most of the
hard to get at issues are gone, and I can't think of side
effects.
Issue migrated from trac ticket # 5456
priority: normal
2002-07-06 11:41:02: magr created the issue
Hi,
I experienced program crashes when moving from wxMSW 2.3.2 to 2.3.3 (CVS). I found that there was a problem with my wxView event handling. As I'm relaying some events to child windows in MyView::ProcessEvent (), there is a chance that events are processed twice due to the command event travelling feature (because the child window is somewhere in the chain of the wxDocMDIChildFrame), and I found that this can cause program crash if wxID_EXIT is handled twice.
At first I tried to fix the problem within my MyView::ProcessEvent(), but then I found it is much easier and cleaner to fix it in the wxDocMDIChildFrame() itself by blocking an event if it appears there for the second time.
As I found that understanding the effects of relaying events in the doc/view framework requires lots of code reading and analyis, I think with this patch most of the hard to get at issues are gone, and I can't think of side effects.
Regards Markus Greither