]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/windows.i
Demo cleanup
[wxWidgets.git] / wxPython / src / windows.i
index 0da45474bcac968d8a67e708456f6f70ca316523..53d137d72bc0bdeef3f5178d3848538eaa8674ef 100644 (file)
@@ -63,6 +63,14 @@ public:
                           (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.");
+            }
         }
 
         bool Disconnect(int id, int lastId = -1,