]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/mac/windows.cpp
no real changes
[wxWidgets.git] / wxPython / src / mac / windows.cpp
index 9a0bced0da7166a25bac6156cc951fd217441d28..7262e9b39428d97990ab9b4c2b79405a6fbac6d5 100644 (file)
@@ -446,6 +446,14 @@ static void  wxEvtHandler_Connect(wxEvtHandler *self,int  id,int  lastId,int  ev
                           (wxObjectEventFunction) &wxPyCallback::EventThunker,
                           new wxPyCallback(func));
             }
                           (wxObjectEventFunction) &wxPyCallback::EventThunker,
                           new wxPyCallback(func));
             }
+            else if (func == Py_None) {
+                self->Disconnect(id, lastId, eventType,
+                                 (wxObjectEventFunction)
+                                 &wxPyCallback::EventThunker);
+            }
+            else {
+                PyErr_SetString(PyExc_TypeError, "Expected callable object or None.");
+            }
         }
 static PyObject *_wrap_wxEvtHandler_Connect(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
         }
 static PyObject *_wrap_wxEvtHandler_Connect(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;