]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/persist/window.h
replace templae Connect() overloads with separate Bind() method to improve compatibil...
[wxWidgets.git] / include / wx / persist / window.h
index 1cb6d012573305ea58be30ea4301c82d7d0cc5f8..84c27ba35c3561bacf367b326b1f3d5e87ac09de 100644 (file)
@@ -34,6 +34,7 @@ public:
     wxPersistentWindowBase(wxWindow *win)
         : wxPersistentObject(win)
     {
+#if wxEVENTS_COMPATIBILITY_2_8
         win->Connect
              (
                 wxEVT_DESTROY,
@@ -42,6 +43,9 @@ public:
                 NULL,
                 this
              );
+#else // !wxEVENTS_COMPATIBILITY_2_8
+        win->Bind(wxEVT_DESTROY, &wxPersistentWindowBase::HandleDestroy, this);
+#endif // wxEVENTS_COMPATIBILITY_2_8/!wxEVENTS_COMPATIBILITY_2_8
     }
 
     virtual wxString GetName() const