]> git.saurik.com Git - wxWidgets.git/commitdiff
use wxCommandEventHandler instead of manually writing several casts
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 2 Feb 2009 20:46:33 +0000 (20:46 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 2 Feb 2009 20:46:33 +0000 (20:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58626 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/event/event.cpp

index 89590990b37e2742bd9a43a04e6238d001b2a6c4..4461234bb94f5f734b56f1ac9e7047956e42038b 100644 (file)
@@ -42,7 +42,7 @@ wxDEFINE_EVENT(wxEVT_MY_CUSTOM_COMMAND, wxCommandEvent)
 #define EVT_MY_CUSTOM_COMMAND(id, fn) \
     DECLARE_EVENT_TABLE_ENTRY( \
         wxEVT_MY_CUSTOM_COMMAND, id, wxID_ANY, \
-        (wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxCommandEventFunction, &fn ), \
+        wxCommandEventHandler(fn), \
         (wxObject *) NULL \
     ),