]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/event.cpp
OS/2 updates for statusbar processing
[wxWidgets.git] / src / common / event.cpp
index ca7605d9b9eb7f5d2cb61db1f2315796fb9f8006..87eda81fdb0ab43f4b79f2295cd6924a26967241 100644 (file)
@@ -82,6 +82,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxIdleEvent, wxEvent)
     IMPLEMENT_DYNAMIC_CLASS(wxQueryNewPaletteEvent, wxEvent)
     IMPLEMENT_DYNAMIC_CLASS(wxWindowCreateEvent, wxEvent)
     IMPLEMENT_DYNAMIC_CLASS(wxWindowDestroyEvent, wxEvent)
+    IMPLEMENT_DYNAMIC_CLASS(wxHelpEvent, wxCommandEvent)
 #endif // wxUSE_GUI
 
 const wxEventTable *wxEvtHandler::GetEventTable() const
@@ -524,14 +525,12 @@ void wxQueryNewPaletteEvent::CopyObject(wxObject& obj_d) const
 }
 
 wxWindowCreateEvent::wxWindowCreateEvent(wxWindow *win)
-                   : wxEvent()
 {
     SetEventType(wxEVT_CREATE);
     SetEventObject(win);
 }
 
 wxWindowDestroyEvent::wxWindowDestroyEvent(wxWindow *win)
-                    : wxEvent()
 {
     SetEventType(wxEVT_DESTROY);
     SetEventObject(win);
@@ -803,7 +802,14 @@ bool wxEvtHandler::SearchEventTable(wxEventTable& table, wxEvent& event)
     // BC++ doesn't like testing for m_fn without != 0
     for ( int i = 0; table.entries[i].m_fn != 0; i++ )
     {
+        // the line using reference exposes a bug in gcc: although it _seems_
+        // to work, it leads to weird crashes later on during program
+        // execution
+#ifdef __GNUG__
+        wxEventTableEntry entry = table.entries[i];
+#else
         const wxEventTableEntry& entry = table.entries[i];
+#endif
 
         // match only if the event type is the same and the id is either -1 in
         // the event table (meaning "any") or the event id matches the id
@@ -827,8 +833,6 @@ bool wxEvtHandler::SearchEventTable(wxEventTable& table, wxEvent& event)
                 return !event.GetSkipped();
             }
         }
-
-        i++;
     }
 
     return FALSE;