]> git.saurik.com Git - wxWidgets.git/commitdiff
extract event handler body in a separate function instead of using a hack to call...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 22 Jun 2009 12:13:56 +0000 (12:13 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 22 Jun 2009 12:13:56 +0000 (12:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/combo/combo.cpp

index 8123b5a7be6b637cf3bf8318b7177aa88e1eaf41..fd5abd249d81a89d16f61e9cec98e3bae833468a 100644 (file)
@@ -532,11 +532,17 @@ public:
         m_animTimer.SetOwner( this, wxID_ANY );
         m_animTimer.Start( 10, wxTIMER_CONTINUOUS );
 
-        OnTimerEvent(*((wxTimerEvent*)NULL));  // Event is never used, so we can give NULL
+        DoOnTimer();
         return false;
     }
 
+private:
     void OnTimerEvent( wxTimerEvent& WXUNUSED(event) )
+    {
+        DoOnTimer();
+    }
+
+    void DoOnTimer()
     {
         bool stopTimer = false;
 
@@ -592,8 +598,6 @@ public:
         }
     }
 
-protected:
-
     // Popup animation related
     wxLongLong  m_animStart;
     wxTimer     m_animTimer;
@@ -601,7 +605,6 @@ protected:
     wxBitmap    m_animBackBitmap;
     int         m_animFlags;
 
-private:
     DECLARE_EVENT_TABLE()
 };