From bb87b19b164b8a3e2390599191ae69e29edc78d5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 6 Feb 2009 21:54:09 +0000 Subject: [PATCH] compilation fix for wxEVENTS_COMPATIBILITY_2_8 case git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/events/evthandler.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/events/evthandler.cpp b/tests/events/evthandler.cpp index ea86660020..0d831307b3 100644 --- a/tests/events/evthandler.cpp +++ b/tests/events/evthandler.cpp @@ -36,7 +36,10 @@ public: virtual wxEvent *Clone() const { return new MyEvent; } }; -#define EVT_MYEVENT(func) wx__DECLARE_EVT0(MyEventType, &func) +typedef void (wxEvtHandler::*MyEventFunction)(MyEvent&); +#define MyEventHandler(func) wxEVENT_HANDLER_CAST(MyEventFunction, func) +#define EVT_MYEVENT(func) \ + wx__DECLARE_EVT0(MyEventType, MyEventHandler(func)) class AnotherEvent : public wxEvent { @@ -123,7 +126,9 @@ BEGIN_EVENT_TABLE(MyClassWithEventTable, wxEvtHandler) EVT_IDLE(MyClassWithEventTable::OnIdle) EVT_MYEVENT(MyClassWithEventTable::OnMyEvent) +#if !wxEVENTS_COMPATIBILITY_2_8 EVT_MYEVENT(MyClassWithEventTable::OnEvent) +#endif // this shouldn't compile: //EVT_MYEVENT(MyClassWithEventTable::OnIdle) -- 2.45.2