]> git.saurik.com Git - wxWidgets.git/commitdiff
workaround BCC bug resulting in E2233 when building the DLL
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 3 Jul 2003 16:43:16 +0000 (16:43 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 3 Jul 2003 16:43:16 +0000 (16:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/event.h

index 05311f7311c5796a9fc126da50a3fa8f0bc423ef..da5a1fcc1767a88ff4e1bb23f4c138edc7915cc8 100644 (file)
@@ -2231,11 +2231,14 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC
         static const wxEventTable        sm_eventTable; \
         virtual const wxEventTable*        GetEventTable() const;
 
+// N.B.: when building DLL with Borland C++ 5.5 compiler, you must initialize
+//       sm_eventTable before using it in GetEventTable() or the compiler gives
+//       E2233 (see http://groups.google.com/groups?selm=397dcc8a%241_2%40dnews)
 #define BEGIN_EVENT_TABLE(theClass, baseClass) \
-    const wxEventTable *theClass::GetEventTable() const \
-        { return &theClass::sm_eventTable; } \
     const wxEventTable theClass::sm_eventTable = \
         { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
+    const wxEventTable *theClass::GetEventTable() const \
+        { return &theClass::sm_eventTable; } \
     const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
 
 #define END_EVENT_TABLE() DECLARE_EVENT_TABLE_ENTRY( wxEVT_NULL, 0, 0, 0, 0 ) };