don't always disable new events code; leave it enabled for MSVC8+

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-02-02 11:39:48 +00:00
parent 004b67a761
commit f57254320e
10 changed files with 35 additions and 27 deletions

View File

@@ -95,11 +95,6 @@ typedef int wxEventType;
// generate a new unique event type // generate a new unique event type
extern WXDLLIMPEXP_BASE wxEventType wxNewEventType(); extern WXDLLIMPEXP_BASE wxEventType wxNewEventType();
// FIXME: currently the new events code is disabled because it creates too
// many problems, it should be reenabled a.s.a.p. or removed
#undef wxEVENTS_COMPATIBILITY_2_8
#define wxEVENTS_COMPATIBILITY_2_8 1
// New macros to create templatized event types: // New macros to create templatized event types:
#if wxEVENTS_COMPATIBILITY_2_8 #if wxEVENTS_COMPATIBILITY_2_8

View File

@@ -53,9 +53,11 @@
// especially, to still allow building if the compiler template support is too // especially, to still allow building if the compiler template support is too
// bad to compile the new code. // bad to compile the new code.
// //
// Default is 0 for all compilers except VC6 currently. // Default is 0 but this is set to 1 automatically in wx/chkconf.h for the
// compilers which can't build the new code (currently only g++ and MSVC >= 8
// can)
// //
// Recommended setting: 0 (please upgrade your compiler instead of changing it) // Recommended setting: 0
#define wxEVENTS_COMPATIBILITY_2_8 0 #define wxEVENTS_COMPATIBILITY_2_8 0
// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when // MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when

View File

@@ -402,14 +402,11 @@
#endif #endif
/* /*
Currently MSVC can't build the library with new-style events: Currently only recent MSVC compilers can build the new events code under
- VC6 simply doesn't have good enough templates support Windows.
- VC7 always seems to choos the Connect() overload using Functor, even when
the argument is a class method
- VC9 compiles the code fine but fails at linking stage in DLL build
*/ */
#if !wxEVENTS_COMPATIBILITY_2_8 #if !wxEVENTS_COMPATIBILITY_2_8
# if defined(__VISUALC__) # if !wxCHECK_VISUALC_VERSION(8)
# undef wxEVENTS_COMPATIBILITY_2_8 # undef wxEVENTS_COMPATIBILITY_2_8
# define wxEVENTS_COMPATIBILITY_2_8 1 # define wxEVENTS_COMPATIBILITY_2_8 1
# endif # endif

View File

@@ -53,9 +53,11 @@
// especially, to still allow building if the compiler template support is too // especially, to still allow building if the compiler template support is too
// bad to compile the new code. // bad to compile the new code.
// //
// Default is 0 for all compilers except VC6 currently. // Default is 0 but this is set to 1 automatically in wx/chkconf.h for the
// compilers which can't build the new code (currently only g++ and MSVC >= 8
// can)
// //
// Recommended setting: 0 (please upgrade your compiler instead of changing it) // Recommended setting: 0
#define wxEVENTS_COMPATIBILITY_2_8 0 #define wxEVENTS_COMPATIBILITY_2_8 0
// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when // MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when

View File

@@ -53,9 +53,11 @@
// especially, to still allow building if the compiler template support is too // especially, to still allow building if the compiler template support is too
// bad to compile the new code. // bad to compile the new code.
// //
// Default is 0 for all compilers except VC6 currently. // Default is 0 but this is set to 1 automatically in wx/chkconf.h for the
// compilers which can't build the new code (currently only g++ and MSVC >= 8
// can)
// //
// Recommended setting: 0 (please upgrade your compiler instead of changing it) // Recommended setting: 0
#define wxEVENTS_COMPATIBILITY_2_8 0 #define wxEVENTS_COMPATIBILITY_2_8 0
// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when // MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when

View File

@@ -53,9 +53,11 @@
// especially, to still allow building if the compiler template support is too // especially, to still allow building if the compiler template support is too
// bad to compile the new code. // bad to compile the new code.
// //
// Default is 0 for all compilers except VC6 currently. // Default is 0 but this is set to 1 automatically in wx/chkconf.h for the
// compilers which can't build the new code (currently only g++ and MSVC >= 8
// can)
// //
// Recommended setting: 0 (please upgrade your compiler instead of changing it) // Recommended setting: 0
#define wxEVENTS_COMPATIBILITY_2_8 0 #define wxEVENTS_COMPATIBILITY_2_8 0
// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when // MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when

View File

@@ -54,9 +54,11 @@
// especially, to still allow building if the compiler template support is too // especially, to still allow building if the compiler template support is too
// bad to compile the new code. // bad to compile the new code.
// //
// Default is 0 for all compilers except VC6 currently. // Default is 0 but this is set to 1 automatically in wx/chkconf.h for the
// compilers which can't build the new code (currently only g++ and MSVC >= 8
// can)
// //
// Recommended setting: 0 (please upgrade your compiler instead of changing it) // Recommended setting: 0
#define wxEVENTS_COMPATIBILITY_2_8 0 #define wxEVENTS_COMPATIBILITY_2_8 0
// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when // MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when

View File

@@ -53,9 +53,11 @@
// especially, to still allow building if the compiler template support is too // especially, to still allow building if the compiler template support is too
// bad to compile the new code. // bad to compile the new code.
// //
// Default is 0 for all compilers except VC6 currently. // Default is 0 but this is set to 1 automatically in wx/chkconf.h for the
// compilers which can't build the new code (currently only g++ and MSVC >= 8
// can)
// //
// Recommended setting: 0 (please upgrade your compiler instead of changing it) // Recommended setting: 0
#define wxEVENTS_COMPATIBILITY_2_8 0 #define wxEVENTS_COMPATIBILITY_2_8 0
// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when // MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when

View File

@@ -49,9 +49,11 @@
// especially, to still allow building if the compiler template support is too // especially, to still allow building if the compiler template support is too
// bad to compile the new code. // bad to compile the new code.
// //
// Default is 0 for all compilers except VC6 currently. // Default is 0 but this is set to 1 automatically in wx/chkconf.h for the
// compilers which can't build the new code (currently only g++ and MSVC >= 8
// can)
// //
// Recommended setting: 0 (please upgrade your compiler instead of changing it) // Recommended setting: 0
#define wxEVENTS_COMPATIBILITY_2_8 0 #define wxEVENTS_COMPATIBILITY_2_8 0
// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when // MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when

View File

@@ -52,9 +52,11 @@
// especially, to still allow building if the compiler template support is too // especially, to still allow building if the compiler template support is too
// bad to compile the new code. // bad to compile the new code.
// //
// Default is 0 for all compilers except VC6 currently. // Default is 0 but this is set to 1 automatically in wx/chkconf.h for the
// compilers which can't build the new code (currently only g++ and MSVC >= 8
// can)
// //
// Recommended setting: 0 (please upgrade your compiler instead of changing it) // Recommended setting: 0
#define wxEVENTS_COMPATIBILITY_2_8 0 #define wxEVENTS_COMPATIBILITY_2_8 0
// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when // MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when