]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/controls2.cpp
Various tweaks, fixes, and additions
[wxWidgets.git] / wxPython / src / gtk / controls2.cpp
index f5a3bbdce4f9db3ba7fe95c62d44807026b44d57..989b105cbad129e0cc5efa68421b3cfa2c6b8c7e 100644 (file)
@@ -61,26 +61,8 @@ extern PyObject *SWIG_newvarlink(void);
 #endif
 #include <wx/listctrl.h>
 #include <wx/treectrl.h>
 #endif
 #include <wx/listctrl.h>
 #include <wx/treectrl.h>
+#include <wx/imaglist.h>
 
 
-static PyObject* l_output_helper(PyObject* target, PyObject* o) {
-    PyObject*   o2;
-    if (!target) {
-        target = o;
-    } else if (target == Py_None) {
-        Py_DECREF(Py_None);
-        target = o;
-    } else {
-        if (!PyList_Check(target)) {
-            o2 = target;
-            target = PyList_New(0);
-            PyList_Append(target, o2);
-           Py_XDECREF(o2);
-        }
-        PyList_Append(target,o);
-       Py_XDECREF(o);
-    }
-    return target;
-}
 
 static PyObject* t_output_helper(PyObject* target, PyObject* o) {
     PyObject*   o2;
 
 static PyObject* t_output_helper(PyObject* target, PyObject* o) {
     PyObject*   o2;
@@ -108,7 +90,11 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
     return target;
 }
 
     return target;
 }
 
-static char* wxStringErrorMsg = "string type is required for parameter";
+#if PYTHON_API_VERSION >= 1009
+    static char* wxStringErrorMsg = "String or Unicode type required";
+#else
+    static char* wxStringErrorMsg = "string type is required for parameter";
+#endif
 
     int wxCALLBACK wxPyListCtrl_SortItems(long item1, long item2, long funcPtr) {
         int retval = 0;
 
     int wxCALLBACK wxPyListCtrl_SortItems(long item1, long item2, long funcPtr) {
         int retval = 0;
@@ -160,6 +146,7 @@ public:
 };
 
 class wxPyTreeCtrl : public wxTreeCtrl {
 };
 
 class wxPyTreeCtrl : public wxTreeCtrl {
+    DECLARE_ABSTRACT_CLASS(wxPyTreeCtrl);
 public:
     wxPyTreeCtrl(wxWindow *parent, wxWindowID id,
                  const wxPoint& pos,
 public:
     wxPyTreeCtrl(wxWindow *parent, wxWindowID id,
                  const wxPoint& pos,
@@ -169,7 +156,6 @@ public:
                  char* name) :
         wxTreeCtrl(parent, id, pos, size, style, validator, name) {}
 
                  char* name) :
         wxTreeCtrl(parent, id, pos, size, style, validator, name) {}
 
-
     int OnCompareItems(const wxTreeItemId& item1,
                        const wxTreeItemId& item2) {
         int rval = 0;
     int OnCompareItems(const wxTreeItemId& item1,
                        const wxTreeItemId& item2) {
         int rval = 0;
@@ -187,6 +173,8 @@ public:
     PYPRIVATE;
 };
 
     PYPRIVATE;
 };
 
+IMPLEMENT_ABSTRACT_CLASS(wxPyTreeCtrl, wxTreeCtrl);
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -205,6 +193,7 @@ static PyObject *_wrap_new_wxListItemAttr(PyObject *self, PyObject *args, PyObje
         _result = (wxListItemAttr *)new_wxListItemAttr();
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxListItemAttr *)new_wxListItemAttr();
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItemAttr_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItemAttr_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -245,6 +234,7 @@ static PyObject *_wrap_wxListItemAttr_SetTextColour(PyObject *self, PyObject *ar
         wxListItemAttr_SetTextColour(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxListItemAttr_SetTextColour(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -280,6 +270,7 @@ static PyObject *_wrap_wxListItemAttr_SetBackgroundColour(PyObject *self, PyObje
         wxListItemAttr_SetBackgroundColour(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxListItemAttr_SetBackgroundColour(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -316,6 +307,7 @@ static PyObject *_wrap_wxListItemAttr_SetFont(PyObject *self, PyObject *args, Py
         wxListItemAttr_SetFont(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxListItemAttr_SetFont(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -344,6 +336,7 @@ static PyObject *_wrap_wxListItemAttr_HasTextColour(PyObject *self, PyObject *ar
         _result = (bool )wxListItemAttr_HasTextColour(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListItemAttr_HasTextColour(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -371,6 +364,7 @@ static PyObject *_wrap_wxListItemAttr_HasBackgroundColour(PyObject *self, PyObje
         _result = (bool )wxListItemAttr_HasBackgroundColour(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListItemAttr_HasBackgroundColour(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -398,6 +392,7 @@ static PyObject *_wrap_wxListItemAttr_HasFont(PyObject *self, PyObject *args, Py
         _result = (bool )wxListItemAttr_HasFont(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListItemAttr_HasFont(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -427,6 +422,7 @@ static PyObject *_wrap_wxListItemAttr_GetTextColour(PyObject *self, PyObject *ar
     _result = (wxColour *) &_result_ref;
 
     wxPy_END_ALLOW_THREADS;
     _result = (wxColour *) &_result_ref;
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -462,6 +458,7 @@ static PyObject *_wrap_wxListItemAttr_GetBackgroundColour(PyObject *self, PyObje
     _result = (wxColour *) &_result_ref;
 
     wxPy_END_ALLOW_THREADS;
     _result = (wxColour *) &_result_ref;
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxColour_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -497,6 +494,7 @@ static PyObject *_wrap_wxListItemAttr_GetFont(PyObject *self, PyObject *args, Py
     _result = (wxFont *) &_result_ref;
 
     wxPy_END_ALLOW_THREADS;
     _result = (wxFont *) &_result_ref;
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxFont_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -507,6 +505,14 @@ static PyObject *_wrap_wxListItemAttr_GetFont(PyObject *self, PyObject *args, Py
     return _resultobj;
 }
 
     return _resultobj;
 }
 
+static void *SwigwxListItemTowxObject(void *ptr) {
+    wxListItem *src;
+    wxObject *dest;
+    src = (wxListItem *) ptr;
+    dest = (wxObject *) src;
+    return (void *) dest;
+}
+
 #define new_wxListItem() (new wxListItem())
 static PyObject *_wrap_new_wxListItem(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
 #define new_wxListItem() (new wxListItem())
 static PyObject *_wrap_new_wxListItem(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -522,6 +528,7 @@ static PyObject *_wrap_new_wxListItem(PyObject *self, PyObject *args, PyObject *
         _result = (wxListItem *)new_wxListItem();
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxListItem *)new_wxListItem();
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -554,6 +561,7 @@ static PyObject *_wrap_delete_wxListItem(PyObject *self, PyObject *args, PyObjec
         delete_wxListItem(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         delete_wxListItem(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -581,6 +589,7 @@ static PyObject *_wrap_wxListItem_Clear(PyObject *self, PyObject *args, PyObject
         wxListItem_Clear(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         wxListItem_Clear(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -608,6 +617,7 @@ static PyObject *_wrap_wxListItem_ClearAttributes(PyObject *self, PyObject *args
         wxListItem_ClearAttributes(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         wxListItem_ClearAttributes(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -636,6 +646,7 @@ static PyObject *_wrap_wxListItem_SetMask(PyObject *self, PyObject *args, PyObje
         wxListItem_SetMask(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxListItem_SetMask(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -664,6 +675,7 @@ static PyObject *_wrap_wxListItem_SetId(PyObject *self, PyObject *args, PyObject
         wxListItem_SetId(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxListItem_SetId(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -692,6 +704,7 @@ static PyObject *_wrap_wxListItem_SetColumn(PyObject *self, PyObject *args, PyOb
         wxListItem_SetColumn(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxListItem_SetColumn(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -720,6 +733,7 @@ static PyObject *_wrap_wxListItem_SetState(PyObject *self, PyObject *args, PyObj
         wxListItem_SetState(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxListItem_SetState(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -748,6 +762,7 @@ static PyObject *_wrap_wxListItem_SetStateMask(PyObject *self, PyObject *args, P
         wxListItem_SetStateMask(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxListItem_SetStateMask(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -776,7 +791,7 @@ static PyObject *_wrap_wxListItem_SetText(PyObject *self, PyObject *args, PyObje
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
-        PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
@@ -795,6 +810,7 @@ static PyObject *_wrap_wxListItem_SetText(PyObject *self, PyObject *args, PyObje
         wxListItem_SetText(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxListItem_SetText(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
@@ -827,6 +843,7 @@ static PyObject *_wrap_wxListItem_SetImage(PyObject *self, PyObject *args, PyObj
         wxListItem_SetImage(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxListItem_SetImage(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -855,6 +872,7 @@ static PyObject *_wrap_wxListItem_SetData(PyObject *self, PyObject *args, PyObje
         wxListItem_SetData(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxListItem_SetData(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -883,6 +901,7 @@ static PyObject *_wrap_wxListItem_SetWidth(PyObject *self, PyObject *args, PyObj
         wxListItem_SetWidth(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxListItem_SetWidth(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -911,6 +930,7 @@ static PyObject *_wrap_wxListItem_SetAlign(PyObject *self, PyObject *args, PyObj
         wxListItem_SetAlign(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxListItem_SetAlign(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -946,6 +966,7 @@ static PyObject *_wrap_wxListItem_SetTextColour(PyObject *self, PyObject *args,
         wxListItem_SetTextColour(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxListItem_SetTextColour(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -981,6 +1002,7 @@ static PyObject *_wrap_wxListItem_SetBackgroundColour(PyObject *self, PyObject *
         wxListItem_SetBackgroundColour(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxListItem_SetBackgroundColour(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1017,6 +1039,7 @@ static PyObject *_wrap_wxListItem_SetFont(PyObject *self, PyObject *args, PyObje
         wxListItem_SetFont(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxListItem_SetFont(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -1045,6 +1068,7 @@ static PyObject *_wrap_wxListItem_GetMask(PyObject *self, PyObject *args, PyObje
         _result = (long )wxListItem_GetMask(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListItem_GetMask(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -1072,6 +1096,7 @@ static PyObject *_wrap_wxListItem_GetId(PyObject *self, PyObject *args, PyObject
         _result = (long )wxListItem_GetId(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListItem_GetId(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -1099,6 +1124,7 @@ static PyObject *_wrap_wxListItem_GetColumn(PyObject *self, PyObject *args, PyOb
         _result = (int )wxListItem_GetColumn(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListItem_GetColumn(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -1126,6 +1152,7 @@ static PyObject *_wrap_wxListItem_GetState(PyObject *self, PyObject *args, PyObj
         _result = (long )wxListItem_GetState(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListItem_GetState(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -1154,6 +1181,7 @@ static PyObject *_wrap_wxListItem_GetText(PyObject *self, PyObject *args, PyObje
     _result = (wxString *) &_result_ref;
 
     wxPy_END_ALLOW_THREADS;
     _result = (wxString *) &_result_ref;
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }{
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
 }
 }{
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
 }
@@ -1183,6 +1211,7 @@ static PyObject *_wrap_wxListItem_GetImage(PyObject *self, PyObject *args, PyObj
         _result = (int )wxListItem_GetImage(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListItem_GetImage(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -1210,6 +1239,7 @@ static PyObject *_wrap_wxListItem_GetData(PyObject *self, PyObject *args, PyObje
         _result = (long )wxListItem_GetData(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListItem_GetData(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -1237,6 +1267,7 @@ static PyObject *_wrap_wxListItem_GetWidth(PyObject *self, PyObject *args, PyObj
         _result = (int )wxListItem_GetWidth(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListItem_GetWidth(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -1264,6 +1295,7 @@ static PyObject *_wrap_wxListItem_GetAlign(PyObject *self, PyObject *args, PyObj
         _result = (wxListColumnFormat )wxListItem_GetAlign(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxListColumnFormat )wxListItem_GetAlign(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -1292,6 +1324,7 @@ static PyObject *_wrap_wxListItem_GetAttributes(PyObject *self, PyObject *args,
         _result = (wxListItemAttr *)wxListItem_GetAttributes(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxListItemAttr *)wxListItem_GetAttributes(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItemAttr_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItemAttr_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -1325,6 +1358,7 @@ static PyObject *_wrap_wxListItem_HasAttributes(PyObject *self, PyObject *args,
         _result = (bool )wxListItem_HasAttributes(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListItem_HasAttributes(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -1353,6 +1387,7 @@ static PyObject *_wrap_wxListItem_GetTextColour(PyObject *self, PyObject *args,
         _result = new wxColour (wxListItem_GetTextColour(_arg0));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxColour (wxListItem_GetTextColour(_arg0));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
@@ -1382,6 +1417,7 @@ static PyObject *_wrap_wxListItem_GetBackgroundColour(PyObject *self, PyObject *
         _result = new wxColour (wxListItem_GetBackgroundColour(_arg0));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxColour (wxListItem_GetBackgroundColour(_arg0));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
@@ -1411,6 +1447,7 @@ static PyObject *_wrap_wxListItem_GetFont(PyObject *self, PyObject *args, PyObje
         _result = new wxFont (wxListItem_GetFont(_arg0));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxFont (wxListItem_GetFont(_arg0));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxFont_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
@@ -1440,6 +1477,7 @@ static PyObject *_wrap_wxListItem_m_mask_set(PyObject *self, PyObject *args, PyO
         _result = (long )wxListItem_m_mask_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListItem_m_mask_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -1467,6 +1505,7 @@ static PyObject *_wrap_wxListItem_m_mask_get(PyObject *self, PyObject *args, PyO
         _result = (long )wxListItem_m_mask_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListItem_m_mask_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -1495,6 +1534,7 @@ static PyObject *_wrap_wxListItem_m_itemId_set(PyObject *self, PyObject *args, P
         _result = (long )wxListItem_m_itemId_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListItem_m_itemId_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -1522,6 +1562,7 @@ static PyObject *_wrap_wxListItem_m_itemId_get(PyObject *self, PyObject *args, P
         _result = (long )wxListItem_m_itemId_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListItem_m_itemId_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -1550,6 +1591,7 @@ static PyObject *_wrap_wxListItem_m_col_set(PyObject *self, PyObject *args, PyOb
         _result = (int )wxListItem_m_col_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListItem_m_col_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -1577,6 +1619,7 @@ static PyObject *_wrap_wxListItem_m_col_get(PyObject *self, PyObject *args, PyOb
         _result = (int )wxListItem_m_col_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListItem_m_col_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -1605,6 +1648,7 @@ static PyObject *_wrap_wxListItem_m_state_set(PyObject *self, PyObject *args, Py
         _result = (long )wxListItem_m_state_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListItem_m_state_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -1632,6 +1676,7 @@ static PyObject *_wrap_wxListItem_m_state_get(PyObject *self, PyObject *args, Py
         _result = (long )wxListItem_m_state_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListItem_m_state_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -1660,6 +1705,7 @@ static PyObject *_wrap_wxListItem_m_stateMask_set(PyObject *self, PyObject *args
         _result = (long )wxListItem_m_stateMask_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListItem_m_stateMask_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -1687,6 +1733,7 @@ static PyObject *_wrap_wxListItem_m_stateMask_get(PyObject *self, PyObject *args
         _result = (long )wxListItem_m_stateMask_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListItem_m_stateMask_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -1715,7 +1762,7 @@ static PyObject *_wrap_wxListItem_m_text_set(PyObject *self, PyObject *args, PyO
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
-        PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
@@ -1734,6 +1781,7 @@ static PyObject *_wrap_wxListItem_m_text_set(PyObject *self, PyObject *args, PyO
         _result = (wxString *)wxListItem_m_text_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxString *)wxListItem_m_text_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }{
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
 }
 }{
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
 }
@@ -1767,6 +1815,7 @@ static PyObject *_wrap_wxListItem_m_text_get(PyObject *self, PyObject *args, PyO
         _result = (wxString *)wxListItem_m_text_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxString *)wxListItem_m_text_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }{
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
 }
 }{
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
 }
@@ -1797,6 +1846,7 @@ static PyObject *_wrap_wxListItem_m_image_set(PyObject *self, PyObject *args, Py
         _result = (int )wxListItem_m_image_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListItem_m_image_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -1824,6 +1874,7 @@ static PyObject *_wrap_wxListItem_m_image_get(PyObject *self, PyObject *args, Py
         _result = (int )wxListItem_m_image_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListItem_m_image_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -1852,6 +1903,7 @@ static PyObject *_wrap_wxListItem_m_data_set(PyObject *self, PyObject *args, PyO
         _result = (long )wxListItem_m_data_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListItem_m_data_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -1879,6 +1931,7 @@ static PyObject *_wrap_wxListItem_m_data_get(PyObject *self, PyObject *args, PyO
         _result = (long )wxListItem_m_data_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListItem_m_data_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -1907,6 +1960,7 @@ static PyObject *_wrap_wxListItem_m_format_set(PyObject *self, PyObject *args, P
         _result = (int )wxListItem_m_format_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListItem_m_format_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -1934,6 +1988,7 @@ static PyObject *_wrap_wxListItem_m_format_get(PyObject *self, PyObject *args, P
         _result = (int )wxListItem_m_format_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListItem_m_format_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -1962,6 +2017,7 @@ static PyObject *_wrap_wxListItem_m_width_set(PyObject *self, PyObject *args, Py
         _result = (int )wxListItem_m_width_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListItem_m_width_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -1989,6 +2045,7 @@ static PyObject *_wrap_wxListItem_m_width_get(PyObject *self, PyObject *args, Py
         _result = (int )wxListItem_m_width_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListItem_m_width_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -2017,6 +2074,14 @@ static void *SwigwxListEventTowxEvent(void *ptr) {
     return (void *) dest;
 }
 
     return (void *) dest;
 }
 
+static void *SwigwxListEventTowxObject(void *ptr) {
+    wxListEvent *src;
+    wxObject *dest;
+    src = (wxListEvent *) ptr;
+    dest = (wxObject *) src;
+    return (void *) dest;
+}
+
 #define wxListEvent_m_code_set(_swigobj,_swigval) (_swigobj->m_code = _swigval,_swigval)
 static PyObject *_wrap_wxListEvent_m_code_set(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
 #define wxListEvent_m_code_set(_swigobj,_swigval) (_swigobj->m_code = _swigval,_swigval)
 static PyObject *_wrap_wxListEvent_m_code_set(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -2041,6 +2106,7 @@ static PyObject *_wrap_wxListEvent_m_code_set(PyObject *self, PyObject *args, Py
         _result = (int )wxListEvent_m_code_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListEvent_m_code_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -2068,6 +2134,7 @@ static PyObject *_wrap_wxListEvent_m_code_get(PyObject *self, PyObject *args, Py
         _result = (int )wxListEvent_m_code_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListEvent_m_code_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -2096,6 +2163,7 @@ static PyObject *_wrap_wxListEvent_m_itemIndex_set(PyObject *self, PyObject *arg
         _result = (long )wxListEvent_m_itemIndex_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListEvent_m_itemIndex_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -2123,6 +2191,7 @@ static PyObject *_wrap_wxListEvent_m_itemIndex_get(PyObject *self, PyObject *arg
         _result = (long )wxListEvent_m_itemIndex_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListEvent_m_itemIndex_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -2151,6 +2220,7 @@ static PyObject *_wrap_wxListEvent_m_oldItemIndex_set(PyObject *self, PyObject *
         _result = (long )wxListEvent_m_oldItemIndex_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListEvent_m_oldItemIndex_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -2178,6 +2248,7 @@ static PyObject *_wrap_wxListEvent_m_oldItemIndex_get(PyObject *self, PyObject *
         _result = (long )wxListEvent_m_oldItemIndex_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListEvent_m_oldItemIndex_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -2206,6 +2277,7 @@ static PyObject *_wrap_wxListEvent_m_col_set(PyObject *self, PyObject *args, PyO
         _result = (int )wxListEvent_m_col_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListEvent_m_col_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -2233,6 +2305,7 @@ static PyObject *_wrap_wxListEvent_m_col_get(PyObject *self, PyObject *args, PyO
         _result = (int )wxListEvent_m_col_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListEvent_m_col_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -2263,6 +2336,7 @@ static PyObject *_wrap_wxListEvent_m_cancelled_set(PyObject *self, PyObject *arg
         _result = (bool )wxListEvent_m_cancelled_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListEvent_m_cancelled_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -2290,6 +2364,7 @@ static PyObject *_wrap_wxListEvent_m_cancelled_get(PyObject *self, PyObject *arg
         _result = (bool )wxListEvent_m_cancelled_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListEvent_m_cancelled_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -2326,6 +2401,7 @@ static PyObject *_wrap_wxListEvent_m_pointDrag_set(PyObject *self, PyObject *arg
         _result = (wxPoint *)wxListEvent_m_pointDrag_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxPoint *)wxListEvent_m_pointDrag_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -2360,6 +2436,7 @@ static PyObject *_wrap_wxListEvent_m_pointDrag_get(PyObject *self, PyObject *arg
         _result = (wxPoint *)wxListEvent_m_pointDrag_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxPoint *)wxListEvent_m_pointDrag_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -2379,7 +2456,6 @@ static PyObject *_wrap_wxListEvent_m_item_set(PyObject *self, PyObject *args, Py
     PyObject * _argo0 = 0;
     PyObject * _argo1 = 0;
     char *_kwnames[] = { "self","m_item", NULL };
     PyObject * _argo0 = 0;
     PyObject * _argo1 = 0;
     char *_kwnames[] = { "self","m_item", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListEvent_m_item_set",_kwnames,&_argo0,&_argo1)) 
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxListEvent_m_item_set",_kwnames,&_argo0,&_argo1)) 
@@ -2403,13 +2479,8 @@ static PyObject *_wrap_wxListEvent_m_item_set(PyObject *self, PyObject *args, Py
         _result = (wxListItem *)wxListEvent_m_item_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxListItem *)wxListEvent_m_item_set(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+    if (PyErr_Occurred()) return NULL;
+}{ _resultobj = wxPyMake_wxObject(_result); }
     return _resultobj;
 }
 
     return _resultobj;
 }
 
@@ -2420,7 +2491,6 @@ static PyObject *_wrap_wxListEvent_m_item_get(PyObject *self, PyObject *args, Py
     wxListEvent * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
     wxListEvent * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_m_item_get",_kwnames,&_argo0)) 
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_m_item_get",_kwnames,&_argo0)) 
@@ -2437,13 +2507,8 @@ static PyObject *_wrap_wxListEvent_m_item_get(PyObject *self, PyObject *args, Py
         _result = (wxListItem *)wxListEvent_m_item_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxListItem *)wxListEvent_m_item_get(_arg0);
 
     wxPy_END_ALLOW_THREADS;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+    if (PyErr_Occurred()) return NULL;
+}{ _resultobj = wxPyMake_wxObject(_result); }
     return _resultobj;
 }
 
     return _resultobj;
 }
 
@@ -2470,6 +2535,7 @@ static PyObject *_wrap_wxListEvent_GetCode(PyObject *self, PyObject *args, PyObj
         _result = (int )wxListEvent_GetCode(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListEvent_GetCode(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -2497,6 +2563,7 @@ static PyObject *_wrap_wxListEvent_GetIndex(PyObject *self, PyObject *args, PyOb
         _result = (long )wxListEvent_GetIndex(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListEvent_GetIndex(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -2524,6 +2591,7 @@ static PyObject *_wrap_wxListEvent_GetOldIndex(PyObject *self, PyObject *args, P
         _result = (long )wxListEvent_GetOldIndex(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListEvent_GetOldIndex(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -2551,6 +2619,7 @@ static PyObject *_wrap_wxListEvent_GetOldItem(PyObject *self, PyObject *args, Py
         _result = (long )wxListEvent_GetOldItem(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListEvent_GetOldItem(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -2578,6 +2647,7 @@ static PyObject *_wrap_wxListEvent_GetColumn(PyObject *self, PyObject *args, PyO
         _result = (int )wxListEvent_GetColumn(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListEvent_GetColumn(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -2605,6 +2675,7 @@ static PyObject *_wrap_wxListEvent_Cancelled(PyObject *self, PyObject *args, PyO
         _result = (bool )wxListEvent_Cancelled(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListEvent_Cancelled(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -2633,6 +2704,7 @@ static PyObject *_wrap_wxListEvent_GetPoint(PyObject *self, PyObject *args, PyOb
         _result = new wxPoint (wxListEvent_GetPoint(_arg0));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxPoint (wxListEvent_GetPoint(_arg0));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
@@ -2662,6 +2734,7 @@ static PyObject *_wrap_wxListEvent_GetLabel(PyObject *self, PyObject *args, PyOb
     _result = (wxString *) &_result_ref;
 
     wxPy_END_ALLOW_THREADS;
     _result = (wxString *) &_result_ref;
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }{
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
 }
 }{
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
 }
@@ -2692,6 +2765,7 @@ static PyObject *_wrap_wxListEvent_GetText(PyObject *self, PyObject *args, PyObj
     _result = (wxString *) &_result_ref;
 
     wxPy_END_ALLOW_THREADS;
     _result = (wxString *) &_result_ref;
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }{
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
 }
 }{
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
 }
@@ -2721,6 +2795,7 @@ static PyObject *_wrap_wxListEvent_GetImage(PyObject *self, PyObject *args, PyOb
         _result = (int )wxListEvent_GetImage(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListEvent_GetImage(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -2748,6 +2823,7 @@ static PyObject *_wrap_wxListEvent_GetData(PyObject *self, PyObject *args, PyObj
         _result = (long )wxListEvent_GetData(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListEvent_GetData(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -2775,6 +2851,7 @@ static PyObject *_wrap_wxListEvent_GetMask(PyObject *self, PyObject *args, PyObj
         _result = (long )wxListEvent_GetMask(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListEvent_GetMask(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -2786,7 +2863,6 @@ static PyObject *_wrap_wxListEvent_GetItem(PyObject *self, PyObject *args, PyObj
     wxListEvent * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
     wxListEvent * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetItem",_kwnames,&_argo0)) 
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxListEvent_GetItem",_kwnames,&_argo0)) 
@@ -2804,13 +2880,8 @@ static PyObject *_wrap_wxListEvent_GetItem(PyObject *self, PyObject *args, PyObj
     _result = (wxListItem *) &_result_ref;
 
     wxPy_END_ALLOW_THREADS;
     _result = (wxListItem *) &_result_ref;
 
     wxPy_END_ALLOW_THREADS;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+    if (PyErr_Occurred()) return NULL;
+}{ _resultobj = wxPyMake_wxObject(_result); }
     return _resultobj;
 }
 
     return _resultobj;
 }
 
@@ -2838,6 +2909,14 @@ static void *SwigwxListCtrlTowxEvtHandler(void *ptr) {
     return (void *) dest;
 }
 
     return (void *) dest;
 }
 
+static void *SwigwxListCtrlTowxObject(void *ptr) {
+    wxListCtrl *src;
+    wxObject *dest;
+    src = (wxListCtrl *) ptr;
+    dest = (wxObject *) src;
+    return (void *) dest;
+}
+
 #define new_wxListCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxListCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
 static PyObject *_wrap_new_wxListCtrl(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
 #define new_wxListCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxListCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
 static PyObject *_wrap_new_wxListCtrl(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -2846,7 +2925,7 @@ static PyObject *_wrap_new_wxListCtrl(PyObject *self, PyObject *args, PyObject *
     wxWindowID  _arg1;
     wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
     wxSize * _arg3 = (wxSize *) &wxDefaultSize;
     wxWindowID  _arg1;
     wxPoint * _arg2 = (wxPoint *) &wxDefaultPosition;
     wxSize * _arg3 = (wxSize *) &wxDefaultSize;
-    long  _arg4 = (long ) wxLC_ICON;
+    long  _arg4 = (long ) (wxLC_ICON);
     wxValidator * _arg5 = (wxValidator *) &wxDefaultValidator;
     char * _arg6 = (char *) "listCtrl";
     PyObject * _argo0 = 0;
     wxValidator * _arg5 = (wxValidator *) &wxDefaultValidator;
     char * _arg6 = (char *) "listCtrl";
     PyObject * _argo0 = 0;
@@ -2892,6 +2971,7 @@ static PyObject *_wrap_new_wxListCtrl(PyObject *self, PyObject *args, PyObject *
         _result = (wxListCtrl *)new_wxListCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6);
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxListCtrl *)new_wxListCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxListCtrl_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxListCtrl_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -2926,6 +3006,7 @@ static PyObject *_wrap_wxListCtrl_Arrange(PyObject *self, PyObject *args, PyObje
         _result = (bool )wxListCtrl_Arrange(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListCtrl_Arrange(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -2962,6 +3043,7 @@ static PyObject *_wrap_wxListCtrl_AssignImageList(PyObject *self, PyObject *args
         wxListCtrl_AssignImageList(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
         wxListCtrl_AssignImageList(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -2991,6 +3073,7 @@ static PyObject *_wrap_wxListCtrl_DeleteItem(PyObject *self, PyObject *args, PyO
         _result = (bool )wxListCtrl_DeleteItem(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListCtrl_DeleteItem(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -3018,6 +3101,7 @@ static PyObject *_wrap_wxListCtrl_DeleteAllItems(PyObject *self, PyObject *args,
         _result = (bool )wxListCtrl_DeleteAllItems(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListCtrl_DeleteAllItems(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -3046,6 +3130,7 @@ static PyObject *_wrap_wxListCtrl_DeleteColumn(PyObject *self, PyObject *args, P
         _result = (bool )wxListCtrl_DeleteColumn(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListCtrl_DeleteColumn(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -3073,6 +3158,7 @@ static PyObject *_wrap_wxListCtrl_DeleteAllColumns(PyObject *self, PyObject *arg
         _result = (bool )wxListCtrl_DeleteAllColumns(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListCtrl_DeleteAllColumns(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -3099,6 +3185,7 @@ static PyObject *_wrap_wxListCtrl_ClearAll(PyObject *self, PyObject *args, PyObj
         wxListCtrl_ClearAll(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         wxListCtrl_ClearAll(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3127,6 +3214,7 @@ static PyObject *_wrap_wxListCtrl_EditLabel(PyObject *self, PyObject *args, PyOb
         wxListCtrl_EditLabel(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxListCtrl_EditLabel(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -3156,6 +3244,7 @@ static PyObject *_wrap_wxListCtrl_EnsureVisible(PyObject *self, PyObject *args,
         _result = (bool )wxListCtrl_EnsureVisible(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListCtrl_EnsureVisible(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -3187,7 +3276,7 @@ static PyObject *_wrap_wxListCtrl_FindItem(PyObject *self, PyObject *args, PyObj
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
-        PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
@@ -3207,6 +3296,7 @@ static PyObject *_wrap_wxListCtrl_FindItem(PyObject *self, PyObject *args, PyObj
         _result = (long )wxListCtrl_FindItem(_arg0,_arg1,*_arg2,_arg3);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListCtrl_FindItem(_arg0,_arg1,*_arg2,_arg3);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
 {
     if (_obj2)
 }    _resultobj = Py_BuildValue("l",_result);
 {
     if (_obj2)
@@ -3240,6 +3330,7 @@ static PyObject *_wrap_wxListCtrl_FindItemData(PyObject *self, PyObject *args, P
         _result = (long )wxListCtrl_FindItemData(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListCtrl_FindItemData(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -3277,6 +3368,7 @@ static PyObject *_wrap_wxListCtrl_FindItemAtPos(PyObject *self, PyObject *args,
         _result = (long )wxListCtrl_FindItemAtPos(_arg0,_arg1,*_arg2,_arg3);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListCtrl_FindItemAtPos(_arg0,_arg1,*_arg2,_arg3);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -3314,6 +3406,7 @@ static PyObject *_wrap_wxListCtrl_GetColumn(PyObject *self, PyObject *args, PyOb
         _result = (bool )wxListCtrl_GetColumn(_arg0,_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListCtrl_GetColumn(_arg0,_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -3342,6 +3435,7 @@ static PyObject *_wrap_wxListCtrl_GetColumnWidth(PyObject *self, PyObject *args,
         _result = (int )wxListCtrl_GetColumnWidth(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListCtrl_GetColumnWidth(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -3369,6 +3463,7 @@ static PyObject *_wrap_wxListCtrl_GetCountPerPage(PyObject *self, PyObject *args
         _result = (int )wxListCtrl_GetCountPerPage(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListCtrl_GetCountPerPage(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -3381,7 +3476,6 @@ static PyObject *_wrap_wxListCtrl_GetImageList(PyObject *self, PyObject *args, P
     int  _arg1;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self","which", NULL };
     int  _arg1;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self","which", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxListCtrl_GetImageList",_kwnames,&_argo0,&_arg1)) 
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxListCtrl_GetImageList",_kwnames,&_argo0,&_arg1)) 
@@ -3398,13 +3492,8 @@ static PyObject *_wrap_wxListCtrl_GetImageList(PyObject *self, PyObject *args, P
         _result = (wxImageList *)wxListCtrl_GetImageList(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxImageList *)wxListCtrl_GetImageList(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageList_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+    if (PyErr_Occurred()) return NULL;
+}{ _resultobj = wxPyMake_wxObject(_result); }
     return _resultobj;
 }
 
     return _resultobj;
 }
 
@@ -3432,6 +3521,7 @@ static PyObject *_wrap_wxListCtrl_GetItemData(PyObject *self, PyObject *args, Py
         _result = (long )wxListCtrl_GetItemData(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListCtrl_GetItemData(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -3452,7 +3542,6 @@ static PyObject *_wrap_wxListCtrl_GetItem(PyObject *self, PyObject *args, PyObje
     int  _arg2 = (int ) 0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self","itemId","col", NULL };
     int  _arg2 = (int ) 0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self","itemId","col", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol|i:wxListCtrl_GetItem",_kwnames,&_argo0,&_arg1,&_arg2)) 
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol|i:wxListCtrl_GetItem",_kwnames,&_argo0,&_arg1,&_arg2)) 
@@ -3469,13 +3558,8 @@ static PyObject *_wrap_wxListCtrl_GetItem(PyObject *self, PyObject *args, PyObje
         _result = (wxListItem *)wxListCtrl_GetItem(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxListItem *)wxListCtrl_GetItem(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxListItem_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+    if (PyErr_Occurred()) return NULL;
+}{ _resultobj = wxPyMake_wxObject(_result); }
     return _resultobj;
 }
 
     return _resultobj;
 }
 
@@ -3508,6 +3592,7 @@ static PyObject *_wrap_wxListCtrl_GetItemPosition(PyObject *self, PyObject *args
         _result = (wxPoint *)wxListCtrl_GetItemPosition(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxPoint *)wxListCtrl_GetItemPosition(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPoint_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -3548,6 +3633,7 @@ static PyObject *_wrap_wxListCtrl_GetItemRect(PyObject *self, PyObject *args, Py
         _result = (wxRect *)wxListCtrl_GetItemRect(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxRect *)wxListCtrl_GetItemRect(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxRect_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxRect_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -3583,6 +3669,7 @@ static PyObject *_wrap_wxListCtrl_GetItemState(PyObject *self, PyObject *args, P
         _result = (int )wxListCtrl_GetItemState(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListCtrl_GetItemState(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -3610,6 +3697,7 @@ static PyObject *_wrap_wxListCtrl_GetItemCount(PyObject *self, PyObject *args, P
         _result = (int )wxListCtrl_GetItemCount(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListCtrl_GetItemCount(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -3640,6 +3728,7 @@ static PyObject *_wrap_wxListCtrl_GetItemSpacing(PyObject *self, PyObject *args,
         _result = (int )wxListCtrl_GetItemSpacing(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListCtrl_GetItemSpacing(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -3668,6 +3757,7 @@ static PyObject *_wrap_wxListCtrl_GetItemText(PyObject *self, PyObject *args, Py
         _result = new wxString (wxListCtrl_GetItemText(_arg0,_arg1));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxString (wxListCtrl_GetItemText(_arg0,_arg1));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }{
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
 }
 }{
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
 }
@@ -3703,6 +3793,7 @@ static PyObject *_wrap_wxListCtrl_GetNextItem(PyObject *self, PyObject *args, Py
         _result = (long )wxListCtrl_GetNextItem(_arg0,_arg1,_arg2,_arg3);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListCtrl_GetNextItem(_arg0,_arg1,_arg2,_arg3);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -3730,6 +3821,7 @@ static PyObject *_wrap_wxListCtrl_GetSelectedItemCount(PyObject *self, PyObject
         _result = (int )wxListCtrl_GetSelectedItemCount(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxListCtrl_GetSelectedItemCount(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -3757,6 +3849,7 @@ static PyObject *_wrap_wxListCtrl_GetTopItem(PyObject *self, PyObject *args, PyO
         _result = (long )wxListCtrl_GetTopItem(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListCtrl_GetTopItem(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -3797,6 +3890,7 @@ static PyObject *_wrap_wxListCtrl_HitTest(PyObject *self, PyObject *args, PyObje
         _result = (long )wxListCtrl_HitTest(_arg0,*_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListCtrl_HitTest(_arg0,*_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
 {
     PyObject *o;
 }    _resultobj = Py_BuildValue("l",_result);
 {
     PyObject *o;
@@ -3839,6 +3933,7 @@ static PyObject *_wrap_wxListCtrl_InsertColumnInfo(PyObject *self, PyObject *arg
         _result = (long )wxListCtrl_InsertColumnInfo(_arg0,_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListCtrl_InsertColumnInfo(_arg0,_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -3870,7 +3965,7 @@ static PyObject *_wrap_wxListCtrl_InsertColumn(PyObject *self, PyObject *args, P
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
-        PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
@@ -3889,6 +3984,7 @@ static PyObject *_wrap_wxListCtrl_InsertColumn(PyObject *self, PyObject *args, P
         _result = (long )wxListCtrl_InsertColumn(_arg0,_arg1,*_arg2,_arg3,_arg4);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListCtrl_InsertColumn(_arg0,_arg1,*_arg2,_arg3,_arg4);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
 {
     if (_obj2)
 }    _resultobj = Py_BuildValue("l",_result);
 {
     if (_obj2)
@@ -3929,6 +4025,7 @@ static PyObject *_wrap_wxListCtrl_InsertItem(PyObject *self, PyObject *args, PyO
         _result = (long )wxListCtrl_InsertItem(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListCtrl_InsertItem(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -3958,7 +4055,7 @@ static PyObject *_wrap_wxListCtrl_InsertStringItem(PyObject *self, PyObject *arg
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
-        PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
@@ -3977,6 +4074,7 @@ static PyObject *_wrap_wxListCtrl_InsertStringItem(PyObject *self, PyObject *arg
         _result = (long )wxListCtrl_InsertStringItem(_arg0,_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListCtrl_InsertStringItem(_arg0,_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
 {
     if (_obj2)
 }    _resultobj = Py_BuildValue("l",_result);
 {
     if (_obj2)
@@ -4010,6 +4108,7 @@ static PyObject *_wrap_wxListCtrl_InsertImageItem(PyObject *self, PyObject *args
         _result = (long )wxListCtrl_InsertImageItem(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListCtrl_InsertImageItem(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("l",_result);
     return _resultobj;
 }
@@ -4040,7 +4139,7 @@ static PyObject *_wrap_wxListCtrl_InsertImageStringItem(PyObject *self, PyObject
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
-        PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
@@ -4059,6 +4158,7 @@ static PyObject *_wrap_wxListCtrl_InsertImageStringItem(PyObject *self, PyObject
         _result = (long )wxListCtrl_InsertImageStringItem(_arg0,_arg1,*_arg2,_arg3);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListCtrl_InsertImageStringItem(_arg0,_arg1,*_arg2,_arg3);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
 {
     if (_obj2)
 }    _resultobj = Py_BuildValue("l",_result);
 {
     if (_obj2)
@@ -4092,6 +4192,7 @@ static PyObject *_wrap_wxListCtrl_ScrollList(PyObject *self, PyObject *args, PyO
         _result = (bool )wxListCtrl_ScrollList(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListCtrl_ScrollList(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -4126,6 +4227,7 @@ static PyObject *_wrap_wxListCtrl_SetBackgroundColour(PyObject *self, PyObject *
         wxListCtrl_SetBackgroundColour(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxListCtrl_SetBackgroundColour(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4164,6 +4266,7 @@ static PyObject *_wrap_wxListCtrl_SetColumn(PyObject *self, PyObject *args, PyOb
         _result = (bool )wxListCtrl_SetColumn(_arg0,_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListCtrl_SetColumn(_arg0,_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -4193,6 +4296,7 @@ static PyObject *_wrap_wxListCtrl_SetColumnWidth(PyObject *self, PyObject *args,
         _result = (bool )wxListCtrl_SetColumnWidth(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListCtrl_SetColumnWidth(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -4229,6 +4333,7 @@ static PyObject *_wrap_wxListCtrl_SetImageList(PyObject *self, PyObject *args, P
         wxListCtrl_SetImageList(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
         wxListCtrl_SetImageList(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4266,6 +4371,7 @@ static PyObject *_wrap_wxListCtrl_SetItem(PyObject *self, PyObject *args, PyObje
         _result = (bool )wxListCtrl_SetItem(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListCtrl_SetItem(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -4297,7 +4403,7 @@ static PyObject *_wrap_wxListCtrl_SetStringItem(PyObject *self, PyObject *args,
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
-        PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
@@ -4316,6 +4422,7 @@ static PyObject *_wrap_wxListCtrl_SetStringItem(PyObject *self, PyObject *args,
         _result = (long )wxListCtrl_SetStringItem(_arg0,_arg1,_arg2,*_arg3,_arg4);
 
     wxPy_END_ALLOW_THREADS;
         _result = (long )wxListCtrl_SetStringItem(_arg0,_arg1,_arg2,*_arg3,_arg4);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("l",_result);
 {
     if (_obj3)
 }    _resultobj = Py_BuildValue("l",_result);
 {
     if (_obj3)
@@ -4349,6 +4456,7 @@ static PyObject *_wrap_wxListCtrl_SetItemData(PyObject *self, PyObject *args, Py
         _result = (bool )wxListCtrl_SetItemData(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListCtrl_SetItemData(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -4379,6 +4487,7 @@ static PyObject *_wrap_wxListCtrl_SetItemImage(PyObject *self, PyObject *args, P
         _result = (bool )wxListCtrl_SetItemImage(_arg0,_arg1,_arg2,_arg3);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListCtrl_SetItemImage(_arg0,_arg1,_arg2,_arg3);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -4415,6 +4524,7 @@ static PyObject *_wrap_wxListCtrl_SetItemPosition(PyObject *self, PyObject *args
         _result = (bool )wxListCtrl_SetItemPosition(_arg0,_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListCtrl_SetItemPosition(_arg0,_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -4445,6 +4555,7 @@ static PyObject *_wrap_wxListCtrl_SetItemState(PyObject *self, PyObject *args, P
         _result = (bool )wxListCtrl_SetItemState(_arg0,_arg1,_arg2,_arg3);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListCtrl_SetItemState(_arg0,_arg1,_arg2,_arg3);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -4473,7 +4584,7 @@ static PyObject *_wrap_wxListCtrl_SetItemText(PyObject *self, PyObject *args, Py
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
-        PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
@@ -4492,6 +4603,7 @@ static PyObject *_wrap_wxListCtrl_SetItemText(PyObject *self, PyObject *args, Py
         wxListCtrl_SetItemText(_arg0,_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
         wxListCtrl_SetItemText(_arg0,_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
@@ -4527,6 +4639,7 @@ static PyObject *_wrap_wxListCtrl_SetSingleStyle(PyObject *self, PyObject *args,
         wxListCtrl_SetSingleStyle(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
         wxListCtrl_SetSingleStyle(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4555,6 +4668,7 @@ static PyObject *_wrap_wxListCtrl_SetWindowStyleFlag(PyObject *self, PyObject *a
         wxListCtrl_SetWindowStyleFlag(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxListCtrl_SetWindowStyleFlag(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4593,6 +4707,7 @@ static PyObject *_wrap_wxListCtrl_SortItems(PyObject *self, PyObject *args, PyOb
         _result = (bool )wxListCtrl_SortItems(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxListCtrl_SortItems(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -4612,6 +4727,7 @@ static PyObject *_wrap_new_wxTreeItemId(PyObject *self, PyObject *args, PyObject
         _result = (wxTreeItemId *)new_wxTreeItemId();
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxTreeItemId *)new_wxTreeItemId();
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxTreeItemId_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxTreeItemId_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -4644,6 +4760,7 @@ static PyObject *_wrap_delete_wxTreeItemId(PyObject *self, PyObject *args, PyObj
         delete_wxTreeItemId(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         delete_wxTreeItemId(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4672,6 +4789,7 @@ static PyObject *_wrap_wxTreeItemId_IsOk(PyObject *self, PyObject *args, PyObjec
         _result = (bool )wxTreeItemId_IsOk(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxTreeItemId_IsOk(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -4711,10 +4829,19 @@ static PyObject *_wrap_wxTreeItemId___cmp__(PyObject *self, PyObject *args, PyOb
         _result = (int )wxTreeItemId___cmp__(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxTreeItemId___cmp__(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 
+static void *SwigwxPyTreeItemDataTowxObject(void *ptr) {
+    wxPyTreeItemData *src;
+    wxObject *dest;
+    src = (wxPyTreeItemData *) ptr;
+    dest = (wxObject *) src;
+    return (void *) dest;
+}
+
 #define new_wxTreeItemData(_swigarg0) (new wxPyTreeItemData(_swigarg0))
 static PyObject *_wrap_new_wxTreeItemData(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
 #define new_wxTreeItemData(_swigarg0) (new wxPyTreeItemData(_swigarg0))
 static PyObject *_wrap_new_wxTreeItemData(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -4736,6 +4863,7 @@ static PyObject *_wrap_new_wxTreeItemData(PyObject *self, PyObject *args, PyObje
         _result = (wxPyTreeItemData *)new_wxTreeItemData(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxPyTreeItemData *)new_wxTreeItemData(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyTreeItemData_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyTreeItemData_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -4769,6 +4897,7 @@ static PyObject *_wrap_wxTreeItemData_GetData(PyObject *self, PyObject *args, Py
         _result = (PyObject *)wxTreeItemData_GetData(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (PyObject *)wxTreeItemData_GetData(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }{
   _resultobj = _result;
 }
 }{
   _resultobj = _result;
 }
@@ -4802,6 +4931,7 @@ static PyObject *_wrap_wxTreeItemData_SetData(PyObject *self, PyObject *args, Py
         wxTreeItemData_SetData(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeItemData_SetData(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4832,6 +4962,7 @@ static PyObject *_wrap_wxTreeItemData_GetId(PyObject *self, PyObject *args, PyOb
     _result = (wxTreeItemId *) &_result_ref;
 
     wxPy_END_ALLOW_THREADS;
     _result = (wxTreeItemId *) &_result_ref;
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxTreeItemId_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxTreeItemId_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -4873,6 +5004,7 @@ static PyObject *_wrap_wxTreeItemData_SetId(PyObject *self, PyObject *args, PyOb
         wxTreeItemData_SetId(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeItemData_SetId(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -4902,6 +5034,14 @@ static void *SwigwxTreeEventTowxEvent(void *ptr) {
     return (void *) dest;
 }
 
     return (void *) dest;
 }
 
+static void *SwigwxTreeEventTowxObject(void *ptr) {
+    wxTreeEvent *src;
+    wxObject *dest;
+    src = (wxTreeEvent *) ptr;
+    dest = (wxObject *) src;
+    return (void *) dest;
+}
+
 #define wxTreeEvent_GetItem(_swigobj)  (_swigobj->GetItem())
 static PyObject *_wrap_wxTreeEvent_GetItem(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
 #define wxTreeEvent_GetItem(_swigobj)  (_swigobj->GetItem())
 static PyObject *_wrap_wxTreeEvent_GetItem(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -4926,6 +5066,7 @@ static PyObject *_wrap_wxTreeEvent_GetItem(PyObject *self, PyObject *args, PyObj
         _result = new wxTreeItemId (wxTreeEvent_GetItem(_arg0));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxTreeItemId (wxTreeEvent_GetItem(_arg0));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
@@ -4955,6 +5096,7 @@ static PyObject *_wrap_wxTreeEvent_GetOldItem(PyObject *self, PyObject *args, Py
         _result = new wxTreeItemId (wxTreeEvent_GetOldItem(_arg0));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxTreeItemId (wxTreeEvent_GetOldItem(_arg0));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
@@ -4984,6 +5126,7 @@ static PyObject *_wrap_wxTreeEvent_GetPoint(PyObject *self, PyObject *args, PyOb
         _result = new wxPoint (wxTreeEvent_GetPoint(_arg0));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxPoint (wxTreeEvent_GetPoint(_arg0));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
@@ -5012,6 +5155,7 @@ static PyObject *_wrap_wxTreeEvent_GetCode(PyObject *self, PyObject *args, PyObj
         _result = (int )wxTreeEvent_GetCode(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxTreeEvent_GetCode(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -5040,6 +5184,7 @@ static PyObject *_wrap_wxTreeEvent_GetLabel(PyObject *self, PyObject *args, PyOb
     _result = (wxString *) &_result_ref;
 
     wxPy_END_ALLOW_THREADS;
     _result = (wxString *) &_result_ref;
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }{
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
 }
 }{
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
 }
@@ -5070,6 +5215,14 @@ static void *SwigwxPyTreeCtrlTowxEvtHandler(void *ptr) {
     return (void *) dest;
 }
 
     return (void *) dest;
 }
 
+static void *SwigwxPyTreeCtrlTowxObject(void *ptr) {
+    wxPyTreeCtrl *src;
+    wxObject *dest;
+    src = (wxPyTreeCtrl *) ptr;
+    dest = (wxObject *) src;
+    return (void *) dest;
+}
+
 #define new_wxTreeCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxPyTreeCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
 static PyObject *_wrap_new_wxTreeCtrl(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
 #define new_wxTreeCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxPyTreeCtrl(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6))
 static PyObject *_wrap_new_wxTreeCtrl(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject * _resultobj;
@@ -5124,6 +5277,7 @@ static PyObject *_wrap_new_wxTreeCtrl(PyObject *self, PyObject *args, PyObject *
         _result = (wxPyTreeCtrl *)new_wxTreeCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6);
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxPyTreeCtrl *)new_wxTreeCtrl(_arg0,_arg1,*_arg2,*_arg3,_arg4,*_arg5,_arg6);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyTreeCtrl_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyTreeCtrl_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -5166,6 +5320,7 @@ static PyObject *_wrap_wxTreeCtrl__setSelf(PyObject *self, PyObject *args, PyObj
         wxTreeCtrl__setSelf(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl__setSelf(_arg0,_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5202,6 +5357,7 @@ static PyObject *_wrap_wxTreeCtrl_AssignImageList(PyObject *self, PyObject *args
         wxTreeCtrl_AssignImageList(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_AssignImageList(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5230,6 +5386,7 @@ static PyObject *_wrap_wxTreeCtrl_GetCount(PyObject *self, PyObject *args, PyObj
         _result = (size_t )wxTreeCtrl_GetCount(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (size_t )wxTreeCtrl_GetCount(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -5257,6 +5414,7 @@ static PyObject *_wrap_wxTreeCtrl_GetIndent(PyObject *self, PyObject *args, PyOb
         _result = (unsigned int )wxTreeCtrl_GetIndent(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (unsigned int )wxTreeCtrl_GetIndent(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -5284,6 +5442,7 @@ static PyObject *_wrap_wxTreeCtrl_SetIndent(PyObject *self, PyObject *args, PyOb
         wxTreeCtrl_SetIndent(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_SetIndent(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5296,7 +5455,6 @@ static PyObject *_wrap_wxTreeCtrl_GetImageList(PyObject *self, PyObject *args, P
     wxPyTreeCtrl * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
     wxPyTreeCtrl * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeCtrl_GetImageList",_kwnames,&_argo0)) 
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeCtrl_GetImageList",_kwnames,&_argo0)) 
@@ -5313,13 +5471,8 @@ static PyObject *_wrap_wxTreeCtrl_GetImageList(PyObject *self, PyObject *args, P
         _result = (wxImageList *)wxTreeCtrl_GetImageList(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxImageList *)wxTreeCtrl_GetImageList(_arg0);
 
     wxPy_END_ALLOW_THREADS;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageList_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+    if (PyErr_Occurred()) return NULL;
+}{ _resultobj = wxPyMake_wxObject(_result); }
     return _resultobj;
 }
 
     return _resultobj;
 }
 
@@ -5330,7 +5483,6 @@ static PyObject *_wrap_wxTreeCtrl_GetStateImageList(PyObject *self, PyObject *ar
     wxPyTreeCtrl * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
     wxPyTreeCtrl * _arg0;
     PyObject * _argo0 = 0;
     char *_kwnames[] = { "self", NULL };
-    char _ptemp[128];
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeCtrl_GetStateImageList",_kwnames,&_argo0)) 
 
     self = self;
     if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeCtrl_GetStateImageList",_kwnames,&_argo0)) 
@@ -5347,13 +5499,8 @@ static PyObject *_wrap_wxTreeCtrl_GetStateImageList(PyObject *self, PyObject *ar
         _result = (wxImageList *)wxTreeCtrl_GetStateImageList(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxImageList *)wxTreeCtrl_GetStateImageList(_arg0);
 
     wxPy_END_ALLOW_THREADS;
-}    if (_result) {
-        SWIG_MakePtr(_ptemp, (char *) _result,"_wxImageList_p");
-        _resultobj = Py_BuildValue("s",_ptemp);
-    } else {
-        Py_INCREF(Py_None);
-        _resultobj = Py_None;
-    }
+    if (PyErr_Occurred()) return NULL;
+}{ _resultobj = wxPyMake_wxObject(_result); }
     return _resultobj;
 }
 
     return _resultobj;
 }
 
@@ -5388,6 +5535,7 @@ static PyObject *_wrap_wxTreeCtrl_SetImageList(PyObject *self, PyObject *args, P
         wxTreeCtrl_SetImageList(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_SetImageList(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5424,6 +5572,7 @@ static PyObject *_wrap_wxTreeCtrl_SetStateImageList(PyObject *self, PyObject *ar
         wxTreeCtrl_SetStateImageList(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_SetStateImageList(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5452,6 +5601,7 @@ static PyObject *_wrap_wxTreeCtrl_GetSpacing(PyObject *self, PyObject *args, PyO
         _result = (unsigned int )wxTreeCtrl_GetSpacing(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (unsigned int )wxTreeCtrl_GetSpacing(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -5479,6 +5629,7 @@ static PyObject *_wrap_wxTreeCtrl_SetSpacing(PyObject *self, PyObject *args, PyO
         wxTreeCtrl_SetSpacing(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_SetSpacing(_arg0,_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5516,6 +5667,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemText(PyObject *self, PyObject *args, Py
         _result = new wxString (wxTreeCtrl_GetItemText(_arg0,*_arg1));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxString (wxTreeCtrl_GetItemText(_arg0,*_arg1));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }{
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
 }
 }{
     _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
 }
@@ -5558,6 +5710,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemImage(PyObject *self, PyObject *args, P
         _result = (int )wxTreeCtrl_GetItemImage(_arg0,*_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxTreeCtrl_GetItemImage(_arg0,*_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -5594,6 +5747,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemSelectedImage(PyObject *self, PyObject
         _result = (int )wxTreeCtrl_GetItemSelectedImage(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (int )wxTreeCtrl_GetItemSelectedImage(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -5630,7 +5784,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemText(PyObject *self, PyObject *args, Py
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
-        PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
@@ -5649,6 +5803,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemText(PyObject *self, PyObject *args, Py
         wxTreeCtrl_SetItemText(_arg0,*_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_SetItemText(_arg0,*_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
 {
@@ -5691,6 +5846,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemImage(PyObject *self, PyObject *args, P
         wxTreeCtrl_SetItemImage(_arg0,*_arg1,_arg2,_arg3);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_SetItemImage(_arg0,*_arg1,_arg2,_arg3);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5728,6 +5884,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemSelectedImage(PyObject *self, PyObject
         wxTreeCtrl_SetItemSelectedImage(_arg0,*_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_SetItemSelectedImage(_arg0,*_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5767,6 +5924,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemHasChildren(PyObject *self, PyObject *a
         wxTreeCtrl_SetItemHasChildren(_arg0,*_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_SetItemHasChildren(_arg0,*_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5813,6 +5971,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemData(PyObject *self, PyObject *args, Py
         _result = (wxPyTreeItemData *)wxPyTreeCtrl_GetItemData(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (wxPyTreeItemData *)wxPyTreeCtrl_GetItemData(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyTreeItemData_p");
         _resultobj = Py_BuildValue("s",_ptemp);
 }    if (_result) {
         SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyTreeItemData_p");
         _resultobj = Py_BuildValue("s",_ptemp);
@@ -5866,6 +6025,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemData(PyObject *self, PyObject *args, Py
         wxPyTreeCtrl_SetItemData(_arg0,*_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
         wxPyTreeCtrl_SetItemData(_arg0,*_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5911,6 +6071,7 @@ static PyObject *_wrap_wxTreeCtrl_GetPyData(PyObject *self, PyObject *args, PyOb
         _result = (PyObject *)wxPyTreeCtrl_GetPyData(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (PyObject *)wxPyTreeCtrl_GetPyData(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }{
   _resultobj = _result;
 }
 }{
   _resultobj = _result;
 }
@@ -5961,6 +6122,7 @@ static PyObject *_wrap_wxTreeCtrl_SetPyData(PyObject *self, PyObject *args, PyOb
         wxPyTreeCtrl_SetPyData(_arg0,*_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
         wxPyTreeCtrl_SetPyData(_arg0,*_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -5998,6 +6160,7 @@ static PyObject *_wrap_wxTreeCtrl_IsVisible(PyObject *self, PyObject *args, PyOb
         _result = (bool )wxTreeCtrl_IsVisible(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxTreeCtrl_IsVisible(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -6034,6 +6197,7 @@ static PyObject *_wrap_wxTreeCtrl_ItemHasChildren(PyObject *self, PyObject *args
         _result = (bool )wxTreeCtrl_ItemHasChildren(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxTreeCtrl_ItemHasChildren(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -6070,6 +6234,7 @@ static PyObject *_wrap_wxTreeCtrl_IsExpanded(PyObject *self, PyObject *args, PyO
         _result = (bool )wxTreeCtrl_IsExpanded(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxTreeCtrl_IsExpanded(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -6106,6 +6271,7 @@ static PyObject *_wrap_wxTreeCtrl_IsSelected(PyObject *self, PyObject *args, PyO
         _result = (bool )wxTreeCtrl_IsSelected(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxTreeCtrl_IsSelected(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -6134,6 +6300,7 @@ static PyObject *_wrap_wxTreeCtrl_GetRootItem(PyObject *self, PyObject *args, Py
         _result = new wxTreeItemId (wxTreeCtrl_GetRootItem(_arg0));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxTreeItemId (wxTreeCtrl_GetRootItem(_arg0));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
@@ -6163,6 +6330,7 @@ static PyObject *_wrap_wxTreeCtrl_GetSelection(PyObject *self, PyObject *args, P
         _result = new wxTreeItemId (wxTreeCtrl_GetSelection(_arg0));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxTreeItemId (wxTreeCtrl_GetSelection(_arg0));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
@@ -6201,6 +6369,7 @@ static PyObject *_wrap_wxTreeCtrl_GetItemParent(PyObject *self, PyObject *args,
         _result = new wxTreeItemId (wxTreeCtrl_GetItemParent(_arg0,*_arg1));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxTreeItemId (wxTreeCtrl_GetItemParent(_arg0,*_arg1));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
@@ -6242,6 +6411,7 @@ static PyObject *_wrap_wxTreeCtrl_GetSelections(PyObject *self, PyObject *args,
         _result = (PyObject *)wxPyTreeCtrl_GetSelections(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         _result = (PyObject *)wxPyTreeCtrl_GetSelections(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }{
   _resultobj = _result;
 }
 }{
   _resultobj = _result;
 }
@@ -6283,6 +6453,7 @@ static PyObject *_wrap_wxTreeCtrl_GetChildrenCount(PyObject *self, PyObject *arg
         _result = (size_t )wxTreeCtrl_GetChildrenCount(_arg0,*_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
         _result = (size_t )wxTreeCtrl_GetChildrenCount(_arg0,*_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -6327,6 +6498,7 @@ static PyObject *_wrap_wxTreeCtrl_GetFirstChild(PyObject *self, PyObject *args,
         _result = new wxTreeItemId (wxTreeCtrl_GetFirstChild(_arg0,*_arg1,*_arg2));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxTreeItemId (wxTreeCtrl_GetFirstChild(_arg0,*_arg1,*_arg2));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
 {
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
 {
@@ -6377,6 +6549,7 @@ static PyObject *_wrap_wxTreeCtrl_GetNextChild(PyObject *self, PyObject *args, P
         _result = new wxTreeItemId (wxTreeCtrl_GetNextChild(_arg0,*_arg1,*_arg2));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxTreeItemId (wxTreeCtrl_GetNextChild(_arg0,*_arg1,*_arg2));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
 {
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
 {
@@ -6420,6 +6593,7 @@ static PyObject *_wrap_wxTreeCtrl_GetNextSibling(PyObject *self, PyObject *args,
         _result = new wxTreeItemId (wxTreeCtrl_GetNextSibling(_arg0,*_arg1));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxTreeItemId (wxTreeCtrl_GetNextSibling(_arg0,*_arg1));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
@@ -6458,6 +6632,7 @@ static PyObject *_wrap_wxTreeCtrl_GetPrevSibling(PyObject *self, PyObject *args,
         _result = new wxTreeItemId (wxTreeCtrl_GetPrevSibling(_arg0,*_arg1));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxTreeItemId (wxTreeCtrl_GetPrevSibling(_arg0,*_arg1));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
@@ -6487,6 +6662,7 @@ static PyObject *_wrap_wxTreeCtrl_GetFirstVisibleItem(PyObject *self, PyObject *
         _result = new wxTreeItemId (wxTreeCtrl_GetFirstVisibleItem(_arg0));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxTreeItemId (wxTreeCtrl_GetFirstVisibleItem(_arg0));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
@@ -6525,6 +6701,7 @@ static PyObject *_wrap_wxTreeCtrl_GetNextVisible(PyObject *self, PyObject *args,
         _result = new wxTreeItemId (wxTreeCtrl_GetNextVisible(_arg0,*_arg1));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxTreeItemId (wxTreeCtrl_GetNextVisible(_arg0,*_arg1));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
@@ -6563,6 +6740,7 @@ static PyObject *_wrap_wxTreeCtrl_GetPrevVisible(PyObject *self, PyObject *args,
         _result = new wxTreeItemId (wxTreeCtrl_GetPrevVisible(_arg0,*_arg1));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxTreeItemId (wxTreeCtrl_GetPrevVisible(_arg0,*_arg1));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
@@ -6601,6 +6779,7 @@ static PyObject *_wrap_wxTreeCtrl_GetLastChild(PyObject *self, PyObject *args, P
         _result = new wxTreeItemId (wxTreeCtrl_GetLastChild(_arg0,*_arg1));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxTreeItemId (wxTreeCtrl_GetLastChild(_arg0,*_arg1));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
     return _resultobj;
@@ -6635,7 +6814,7 @@ static PyObject *_wrap_wxTreeCtrl_AddRoot(PyObject *self, PyObject *args, PyObje
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
-        PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
@@ -6661,6 +6840,7 @@ static PyObject *_wrap_wxTreeCtrl_AddRoot(PyObject *self, PyObject *args, PyObje
         _result = new wxTreeItemId (wxTreeCtrl_AddRoot(_arg0,*_arg1,_arg2,_arg3,_arg4));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxTreeItemId (wxTreeCtrl_AddRoot(_arg0,*_arg1,_arg2,_arg3,_arg4));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
 {
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
 {
@@ -6708,7 +6888,7 @@ static PyObject *_wrap_wxTreeCtrl_PrependItem(PyObject *self, PyObject *args, Py
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
-        PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
@@ -6734,6 +6914,7 @@ static PyObject *_wrap_wxTreeCtrl_PrependItem(PyObject *self, PyObject *args, Py
         _result = new wxTreeItemId (wxTreeCtrl_PrependItem(_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxTreeItemId (wxTreeCtrl_PrependItem(_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
 {
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
 {
@@ -6790,7 +6971,7 @@ static PyObject *_wrap_wxTreeCtrl_InsertItem(PyObject *self, PyObject *args, PyO
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
-        PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
@@ -6816,6 +6997,7 @@ static PyObject *_wrap_wxTreeCtrl_InsertItem(PyObject *self, PyObject *args, PyO
         _result = new wxTreeItemId (wxTreeCtrl_InsertItem(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxTreeItemId (wxTreeCtrl_InsertItem(_arg0,*_arg1,*_arg2,*_arg3,_arg4,_arg5,_arg6));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
 {
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
 {
@@ -6864,7 +7046,7 @@ static PyObject *_wrap_wxTreeCtrl_InsertItemBefore(PyObject *self, PyObject *arg
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
-        PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
@@ -6890,6 +7072,7 @@ static PyObject *_wrap_wxTreeCtrl_InsertItemBefore(PyObject *self, PyObject *arg
         _result = new wxTreeItemId (wxTreeCtrl_InsertItemBefore(_arg0,*_arg1,_arg2,*_arg3,_arg4,_arg5,_arg6));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxTreeItemId (wxTreeCtrl_InsertItemBefore(_arg0,*_arg1,_arg2,*_arg3,_arg4,_arg5,_arg6));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
 {
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
 {
@@ -6937,7 +7120,7 @@ static PyObject *_wrap_wxTreeCtrl_AppendItem(PyObject *self, PyObject *args, PyO
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
 #if PYTHON_API_VERSION >= 1009
     char* tmpPtr; int tmpSize;
     if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
-        PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+        PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
         return NULL;
     }
     if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
@@ -6963,6 +7146,7 @@ static PyObject *_wrap_wxTreeCtrl_AppendItem(PyObject *self, PyObject *args, PyO
         _result = new wxTreeItemId (wxTreeCtrl_AppendItem(_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxTreeItemId (wxTreeCtrl_AppendItem(_arg0,*_arg1,*_arg2,_arg3,_arg4,_arg5));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
 {
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
 {
@@ -7003,6 +7187,7 @@ static PyObject *_wrap_wxTreeCtrl_Delete(PyObject *self, PyObject *args, PyObjec
         wxTreeCtrl_Delete(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_Delete(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7039,6 +7224,7 @@ static PyObject *_wrap_wxTreeCtrl_DeleteChildren(PyObject *self, PyObject *args,
         wxTreeCtrl_DeleteChildren(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_DeleteChildren(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7066,6 +7252,7 @@ static PyObject *_wrap_wxTreeCtrl_DeleteAllItems(PyObject *self, PyObject *args,
         wxTreeCtrl_DeleteAllItems(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_DeleteAllItems(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7102,6 +7289,7 @@ static PyObject *_wrap_wxTreeCtrl_Expand(PyObject *self, PyObject *args, PyObjec
         wxTreeCtrl_Expand(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_Expand(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7138,6 +7326,7 @@ static PyObject *_wrap_wxTreeCtrl_Collapse(PyObject *self, PyObject *args, PyObj
         wxTreeCtrl_Collapse(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_Collapse(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7174,6 +7363,7 @@ static PyObject *_wrap_wxTreeCtrl_CollapseAndReset(PyObject *self, PyObject *arg
         wxTreeCtrl_CollapseAndReset(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_CollapseAndReset(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7210,6 +7400,7 @@ static PyObject *_wrap_wxTreeCtrl_Toggle(PyObject *self, PyObject *args, PyObjec
         wxTreeCtrl_Toggle(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_Toggle(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7237,6 +7428,7 @@ static PyObject *_wrap_wxTreeCtrl_Unselect(PyObject *self, PyObject *args, PyObj
         wxTreeCtrl_Unselect(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_Unselect(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7264,6 +7456,7 @@ static PyObject *_wrap_wxTreeCtrl_UnselectAll(PyObject *self, PyObject *args, Py
         wxTreeCtrl_UnselectAll(_arg0);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_UnselectAll(_arg0);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7300,6 +7493,7 @@ static PyObject *_wrap_wxTreeCtrl_SelectItem(PyObject *self, PyObject *args, PyO
         wxTreeCtrl_SelectItem(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_SelectItem(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7336,6 +7530,7 @@ static PyObject *_wrap_wxTreeCtrl_EnsureVisible(PyObject *self, PyObject *args,
         wxTreeCtrl_EnsureVisible(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_EnsureVisible(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7372,6 +7567,7 @@ static PyObject *_wrap_wxTreeCtrl_ScrollTo(PyObject *self, PyObject *args, PyObj
         wxTreeCtrl_ScrollTo(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_ScrollTo(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7408,6 +7604,7 @@ static PyObject *_wrap_wxTreeCtrl_EditLabel(PyObject *self, PyObject *args, PyOb
         wxTreeCtrl_EditLabel(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_EditLabel(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7444,6 +7641,7 @@ static PyObject *_wrap_wxTreeCtrl_SortChildren(PyObject *self, PyObject *args, P
         wxTreeCtrl_SortChildren(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_SortChildren(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7481,6 +7679,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemBold(PyObject *self, PyObject *args, Py
         wxTreeCtrl_SetItemBold(_arg0,*_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_SetItemBold(_arg0,*_arg1,_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7518,6 +7717,7 @@ static PyObject *_wrap_wxTreeCtrl_IsBold(PyObject *self, PyObject *args, PyObjec
         _result = (bool )wxTreeCtrl_IsBold(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
         _result = (bool )wxTreeCtrl_IsBold(_arg0,*_arg1);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
 }    _resultobj = Py_BuildValue("i",_result);
     return _resultobj;
 }
@@ -7559,6 +7759,7 @@ static PyObject *_wrap_wxTreeCtrl_HitTest(PyObject *self, PyObject *args, PyObje
         _result = new wxTreeItemId (wxTreeCtrl_HitTest(_arg0,*_arg1,*_arg2));
 
     wxPy_END_ALLOW_THREADS;
         _result = new wxTreeItemId (wxTreeCtrl_HitTest(_arg0,*_arg1,*_arg2));
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
 {
 }    SWIG_MakePtr(_ptemp, (void *) _result,"_wxTreeItemId_p");
     _resultobj = Py_BuildValue("s",_ptemp);
 {
@@ -7608,6 +7809,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemTextColour(PyObject *self, PyObject *ar
         wxTreeCtrl_SetItemTextColour(_arg0,*_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_SetItemTextColour(_arg0,*_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7652,6 +7854,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemBackgroundColour(PyObject *self, PyObje
         wxTreeCtrl_SetItemBackgroundColour(_arg0,*_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_SetItemBackgroundColour(_arg0,*_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7697,6 +7900,7 @@ static PyObject *_wrap_wxTreeCtrl_SetItemFont(PyObject *self, PyObject *args, Py
         wxTreeCtrl_SetItemFont(_arg0,*_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
         wxTreeCtrl_SetItemFont(_arg0,*_arg1,*_arg2);
 
     wxPy_END_ALLOW_THREADS;
+    if (PyErr_Occurred()) return NULL;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
 }    Py_INCREF(Py_None);
     _resultobj = Py_None;
     return _resultobj;
@@ -7929,18 +8133,11 @@ static PyMethodDef controls2cMethods[] = {
  * This table is used by the pointer type-checker
  */
 static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
  * This table is used by the pointer type-checker
  */
 static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
-    { "_wxAcceleratorTable","_class_wxAcceleratorTable",0},
     { "_wxEvent","_class_wxTreeEvent",SwigwxTreeEventTowxEvent},
     { "_wxEvent","_wxTreeEvent",SwigwxTreeEventTowxEvent},
     { "_wxEvent","_class_wxListEvent",SwigwxListEventTowxEvent},
     { "_wxEvent","_wxListEvent",SwigwxListEventTowxEvent},
     { "_wxEvent","_class_wxTreeEvent",SwigwxTreeEventTowxEvent},
     { "_wxEvent","_wxTreeEvent",SwigwxTreeEventTowxEvent},
     { "_wxEvent","_class_wxListEvent",SwigwxListEventTowxEvent},
     { "_wxEvent","_wxListEvent",SwigwxListEventTowxEvent},
-    { "_wxEvent","_class_wxEvent",0},
-    { "_class_wxActivateEvent","_wxActivateEvent",0},
     { "_signed_long","_long",0},
     { "_signed_long","_long",0},
-    { "_wxMenuEvent","_class_wxMenuEvent",0},
-    { "_wxPyBitmapDataObject","_class_wxPyBitmapDataObject",0},
-    { "_wxBitmapDataObject","_class_wxBitmapDataObject",0},
-    { "_class_wxPyCommandEvent","_wxPyCommandEvent",0},
     { "_wxPrintQuality","_wxCoord",0},
     { "_wxPrintQuality","_int",0},
     { "_wxPrintQuality","_signed_int",0},
     { "_wxPrintQuality","_wxCoord",0},
     { "_wxPrintQuality","_int",0},
     { "_wxPrintQuality","_signed_int",0},
@@ -7950,50 +8147,29 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_wxPrintQuality","_EBool",0},
     { "_wxPrintQuality","_size_t",0},
     { "_wxPrintQuality","_time_t",0},
     { "_wxPrintQuality","_EBool",0},
     { "_wxPrintQuality","_size_t",0},
     { "_wxPrintQuality","_time_t",0},
-    { "_class_wxCustomDataObject","_wxCustomDataObject",0},
-    { "_wxSpinCtrl","_class_wxSpinCtrl",0},
-    { "_class_wxRegionIterator","_wxRegionIterator",0},
-    { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0},
-    { "_class_wxMenuBar","_wxMenuBar",0},
-    { "_class_wxPyTreeItemData","_wxPyTreeItemData",0},
     { "_class_wxEvtHandler","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler},
     { "_class_wxEvtHandler","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler},
     { "_class_wxEvtHandler","_class_wxListCtrl",SwigwxListCtrlTowxEvtHandler},
     { "_class_wxEvtHandler","_wxListCtrl",SwigwxListCtrlTowxEvtHandler},
     { "_class_wxEvtHandler","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler},
     { "_class_wxEvtHandler","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler},
     { "_class_wxEvtHandler","_class_wxListCtrl",SwigwxListCtrlTowxEvtHandler},
     { "_class_wxEvtHandler","_wxListCtrl",SwigwxListCtrlTowxEvtHandler},
-    { "_class_wxEvtHandler","_wxEvtHandler",0},
-    { "_wxPaintEvent","_class_wxPaintEvent",0},
-    { "_wxIndividualLayoutConstraint","_class_wxIndividualLayoutConstraint",0},
-    { "_wxCursor","_class_wxCursor",0},
     { "_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent},
     { "_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent},
     { "_wxNotifyEvent","_class_wxListEvent",SwigwxListEventTowxNotifyEvent},
     { "_wxNotifyEvent","_wxListEvent",SwigwxListEventTowxNotifyEvent},
     { "_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent},
     { "_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent},
     { "_wxNotifyEvent","_class_wxListEvent",SwigwxListEventTowxNotifyEvent},
     { "_wxNotifyEvent","_wxListEvent",SwigwxListEventTowxNotifyEvent},
-    { "_wxNotifyEvent","_class_wxNotifyEvent",0},
-    { "_wxPyTreeCtrl","_class_wxPyTreeCtrl",0},
-    { "_wxMask","_class_wxMask",0},
-    { "_wxPen","_class_wxPen",0},
-    { "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0},
     { "_byte","_unsigned_char",0},
     { "_byte","_unsigned_char",0},
-    { "_wxDataObject","_class_wxDataObject",0},
-    { "_wxStaticBox","_class_wxStaticBox",0},
-    { "_wxColourDatabase","_class_wxColourDatabase",0},
-    { "_wxPyDataObjectSimple","_class_wxPyDataObjectSimple",0},
-    { "_wxPyDropSource","_class_wxPyDropSource",0},
-    { "_wxChoice","_class_wxChoice",0},
-    { "_wxSlider","_class_wxSlider",0},
     { "_long","_unsigned_long",0},
     { "_long","_signed_long",0},
     { "_long","_unsigned_long",0},
     { "_long","_signed_long",0},
-    { "_wxImageList","_class_wxImageList",0},
-    { "_wxDataObjectSimple","_class_wxDataObjectSimple",0},
-    { "_wxDropFilesEvent","_class_wxDropFilesEvent",0},
-    { "_wxBitmapButton","_class_wxBitmapButton",0},
-    { "_class_wxAcceleratorTable","_wxAcceleratorTable",0},
-    { "_class_wxClipboard","_wxClipboard",0},
-    { "_class_wxGauge","_wxGauge",0},
-    { "_wxDC","_class_wxDC",0},
-    { "_class_wxBitmapDataObject","_wxBitmapDataObject",0},
-    { "_wxListEvent","_class_wxListEvent",0},
-    { "_wxSpinEvent","_class_wxSpinEvent",0},
+    { "_class_wxObject","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxObject},
+    { "_class_wxObject","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxObject},
+    { "_class_wxObject","_class_wxTreeEvent",SwigwxTreeEventTowxObject},
+    { "_class_wxObject","_wxTreeEvent",SwigwxTreeEventTowxObject},
+    { "_class_wxObject","_class_wxPyTreeItemData",SwigwxPyTreeItemDataTowxObject},
+    { "_class_wxObject","_wxPyTreeItemData",SwigwxPyTreeItemDataTowxObject},
+    { "_class_wxObject","_class_wxListCtrl",SwigwxListCtrlTowxObject},
+    { "_class_wxObject","_wxListCtrl",SwigwxListCtrlTowxObject},
+    { "_class_wxObject","_class_wxListEvent",SwigwxListEventTowxObject},
+    { "_class_wxObject","_wxListEvent",SwigwxListEventTowxObject},
+    { "_class_wxObject","_class_wxListItem",SwigwxListItemTowxObject},
+    { "_class_wxObject","_wxListItem",SwigwxListItemTowxObject},
     { "_size_t","_wxCoord",0},
     { "_size_t","_wxPrintQuality",0},
     { "_size_t","_time_t",0},
     { "_size_t","_wxCoord",0},
     { "_size_t","_wxPrintQuality",0},
     { "_size_t","_time_t",0},
@@ -8001,33 +8177,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_size_t","_int",0},
     { "_size_t","_wxWindowID",0},
     { "_size_t","_uint",0},
     { "_size_t","_int",0},
     { "_size_t","_wxWindowID",0},
     { "_size_t","_uint",0},
-    { "_class_wxRealPoint","_wxRealPoint",0},
-    { "_wxNavigationKeyEvent","_class_wxNavigationKeyEvent",0},
-    { "_wxWindowCreateEvent","_class_wxWindowCreateEvent",0},
-    { "_class_wxMenuItem","_wxMenuItem",0},
-    { "_class_wxPaintEvent","_wxPaintEvent",0},
-    { "_wxSysColourChangedEvent","_class_wxSysColourChangedEvent",0},
-    { "_class_wxPostScriptDC","_wxPostScriptDC",0},
-    { "_wxPanel","_class_wxPanel",0},
-    { "_wxInitDialogEvent","_class_wxInitDialogEvent",0},
-    { "_wxCheckBox","_class_wxCheckBox",0},
-    { "_class_wxPyTreeCtrl","_wxPyTreeCtrl",0},
-    { "_wxPyEvent","_class_wxPyEvent",0},
-    { "_wxTextCtrl","_class_wxTextCtrl",0},
-    { "_class_wxMask","_wxMask",0},
-    { "_wxTextDataObject","_class_wxTextDataObject",0},
-    { "_class_wxKeyEvent","_wxKeyEvent",0},
-    { "_wxColour","_class_wxColour",0},
-    { "_class_wxDialog","_wxDialog",0},
-    { "_class_wxFileDataObject","_wxFileDataObject",0},
-    { "_wxIdleEvent","_class_wxIdleEvent",0},
-    { "_class_wxUpdateUIEvent","_wxUpdateUIEvent",0},
-    { "_class_wxDataObject","_wxDataObject",0},
-    { "_wxStaticLine","_class_wxStaticLine",0},
-    { "_wxBrush","_class_wxBrush",0},
-    { "_wxDataFormat","_class_wxDataFormat",0},
-    { "_class_wxDataObjectSimple","_wxDataObjectSimple",0},
-    { "_wxShowEvent","_class_wxShowEvent",0},
     { "_uint","_wxCoord",0},
     { "_uint","_wxPrintQuality",0},
     { "_uint","_time_t",0},
     { "_uint","_wxCoord",0},
     { "_uint","_wxPrintQuality",0},
     { "_uint","_time_t",0},
@@ -8036,140 +8185,58 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_uint","_int",0},
     { "_uint","_wxWindowID",0},
     { "_wxChar","_char",0},
     { "_uint","_int",0},
     { "_uint","_wxWindowID",0},
     { "_wxChar","_char",0},
-    { "_wxPyValidator","_class_wxPyValidator",0},
     { "_class_wxEvent","_class_wxTreeEvent",SwigwxTreeEventTowxEvent},
     { "_class_wxEvent","_wxTreeEvent",SwigwxTreeEventTowxEvent},
     { "_class_wxEvent","_class_wxListEvent",SwigwxListEventTowxEvent},
     { "_class_wxEvent","_wxListEvent",SwigwxListEventTowxEvent},
     { "_class_wxEvent","_class_wxTreeEvent",SwigwxTreeEventTowxEvent},
     { "_class_wxEvent","_wxTreeEvent",SwigwxTreeEventTowxEvent},
     { "_class_wxEvent","_class_wxListEvent",SwigwxListEventTowxEvent},
     { "_class_wxEvent","_wxListEvent",SwigwxListEventTowxEvent},
-    { "_class_wxEvent","_wxEvent",0},
-    { "_wxCheckListBox","_class_wxCheckListBox",0},
-    { "_wxRect","_class_wxRect",0},
     { "_wxCommandEvent","_class_wxTreeEvent",SwigwxTreeEventTowxCommandEvent},
     { "_wxCommandEvent","_wxTreeEvent",SwigwxTreeEventTowxCommandEvent},
     { "_wxCommandEvent","_class_wxListEvent",SwigwxListEventTowxCommandEvent},
     { "_wxCommandEvent","_wxListEvent",SwigwxListEventTowxCommandEvent},
     { "_wxCommandEvent","_class_wxTreeEvent",SwigwxTreeEventTowxCommandEvent},
     { "_wxCommandEvent","_wxTreeEvent",SwigwxTreeEventTowxCommandEvent},
     { "_wxCommandEvent","_class_wxListEvent",SwigwxListEventTowxCommandEvent},
     { "_wxCommandEvent","_wxListEvent",SwigwxListEventTowxCommandEvent},
-    { "_wxCommandEvent","_class_wxCommandEvent",0},
-    { "_wxSizeEvent","_class_wxSizeEvent",0},
-    { "_wxPoint","_class_wxPoint",0},
-    { "_class_wxButton","_wxButton",0},
-    { "_wxRadioBox","_class_wxRadioBox",0},
-    { "_class_wxSpinCtrl","_wxSpinCtrl",0},
     { "_char","_wxChar",0},
     { "_char","_wxChar",0},
-    { "_wxBitmap","_class_wxBitmap",0},
-    { "_wxPenList","_class_wxPenList",0},
-    { "_wxWindowDC","_class_wxWindowDC",0},
-    { "_wxTimerEvent","_class_wxTimerEvent",0},
-    { "_wxScrollBar","_class_wxScrollBar",0},
-    { "_wxSpinButton","_class_wxSpinButton",0},
-    { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0},
     { "_class_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent},
     { "_class_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent},
     { "_class_wxNotifyEvent","_class_wxListEvent",SwigwxListEventTowxNotifyEvent},
     { "_class_wxNotifyEvent","_wxListEvent",SwigwxListEventTowxNotifyEvent},
     { "_class_wxNotifyEvent","_class_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent},
     { "_class_wxNotifyEvent","_wxTreeEvent",SwigwxTreeEventTowxNotifyEvent},
     { "_class_wxNotifyEvent","_class_wxListEvent",SwigwxListEventTowxNotifyEvent},
     { "_class_wxNotifyEvent","_wxListEvent",SwigwxListEventTowxNotifyEvent},
-    { "_class_wxNotifyEvent","_wxNotifyEvent",0},
-    { "_class_wxValidator","_wxValidator",0},
-    { "_class_wxPyEvent","_wxPyEvent",0},
-    { "_class_wxIconizeEvent","_wxIconizeEvent",0},
-    { "_class_wxStaticBitmap","_wxStaticBitmap",0},
-    { "_wxListItem","_class_wxListItem",0},
-    { "_wxDropTarget","_class_wxDropTarget",0},
-    { "_class_wxStaticLine","_wxStaticLine",0},
-    { "_class_wxColourDatabase","_wxColourDatabase",0},
-    { "_wxScrollEvent","_class_wxScrollEvent",0},
     { "_EBool","_wxCoord",0},
     { "_EBool","_wxPrintQuality",0},
     { "_EBool","_signed_int",0},
     { "_EBool","_int",0},
     { "_EBool","_wxWindowID",0},
     { "_EBool","_wxCoord",0},
     { "_EBool","_wxPrintQuality",0},
     { "_EBool","_signed_int",0},
     { "_EBool","_int",0},
     { "_EBool","_wxWindowID",0},
-    { "_class_wxRegion","_wxRegion",0},
-    { "_class_wxDataFormat","_wxDataFormat",0},
-    { "_class_wxDropFilesEvent","_wxDropFilesEvent",0},
-    { "_wxWindowDestroyEvent","_class_wxWindowDestroyEvent",0},
-    { "_wxStaticText","_class_wxStaticText",0},
-    { "_wxFont","_class_wxFont",0},
-    { "_class_wxPyDropTarget","_wxPyDropTarget",0},
-    { "_wxCloseEvent","_class_wxCloseEvent",0},
     { "_unsigned_long","_long",0},
     { "_unsigned_long","_long",0},
-    { "_class_wxRect","_wxRect",0},
-    { "_class_wxDC","_wxDC",0},
-    { "_wxScrollWinEvent","_class_wxScrollWinEvent",0},
-    { "_class_wxBrushList","_wxBrushList",0},
-    { "_wxQueryNewPaletteEvent","_class_wxQueryNewPaletteEvent",0},
-    { "_class_wxPenList","_wxPenList",0},
-    { "_class_wxWindowCreateEvent","_wxWindowCreateEvent",0},
-    { "_class_wxTreeEvent","_wxTreeEvent",0},
-    { "_wxFocusEvent","_class_wxFocusEvent",0},
-    { "_wxMaximizeEvent","_class_wxMaximizeEvent",0},
-    { "_class_wxTimerEvent","_wxTimerEvent",0},
-    { "_class_wxSpinButton","_wxSpinButton",0},
-    { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0},
-    { "_class_wxPanel","_wxPanel",0},
-    { "_class_wxCheckBox","_wxCheckBox",0},
-    { "_wxComboBox","_class_wxComboBox",0},
-    { "_wxRadioButton","_class_wxRadioButton",0},
     { "_signed_int","_wxCoord",0},
     { "_signed_int","_wxPrintQuality",0},
     { "_signed_int","_EBool",0},
     { "_signed_int","_wxWindowID",0},
     { "_signed_int","_int",0},
     { "_signed_int","_wxCoord",0},
     { "_signed_int","_wxPrintQuality",0},
     { "_signed_int","_EBool",0},
     { "_signed_int","_wxWindowID",0},
     { "_signed_int","_int",0},
-    { "_class_wxTextCtrl","_wxTextCtrl",0},
-    { "_class_wxListItemAttr","_wxListItemAttr",0},
-    { "_wxLayoutConstraints","_class_wxLayoutConstraints",0},
-    { "_class_wxTextDataObject","_wxTextDataObject",0},
-    { "_wxMenu","_class_wxMenu",0},
-    { "_class_wxMoveEvent","_wxMoveEvent",0},
-    { "_wxListBox","_class_wxListBox",0},
-    { "_wxScreenDC","_class_wxScreenDC",0},
     { "_WXTYPE","_short",0},
     { "_WXTYPE","_signed_short",0},
     { "_WXTYPE","_unsigned_short",0},
     { "_WXTYPE","_short",0},
     { "_WXTYPE","_signed_short",0},
     { "_WXTYPE","_unsigned_short",0},
-    { "_class_wxDropTarget","_wxDropTarget",0},
-    { "_class_wxBrush","_wxBrush",0},
     { "_unsigned_short","_WXTYPE",0},
     { "_unsigned_short","_short",0},
     { "_class_wxWindow","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow},
     { "_class_wxWindow","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow},
     { "_class_wxWindow","_class_wxListCtrl",SwigwxListCtrlTowxWindow},
     { "_class_wxWindow","_wxListCtrl",SwigwxListCtrlTowxWindow},
     { "_unsigned_short","_WXTYPE",0},
     { "_unsigned_short","_short",0},
     { "_class_wxWindow","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow},
     { "_class_wxWindow","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow},
     { "_class_wxWindow","_class_wxListCtrl",SwigwxListCtrlTowxWindow},
     { "_class_wxWindow","_wxListCtrl",SwigwxListCtrlTowxWindow},
-    { "_class_wxWindow","_wxWindow",0},
-    { "_class_wxStaticText","_wxStaticText",0},
-    { "_class_wxFont","_wxFont",0},
-    { "_wxClipboard","_class_wxClipboard",0},
-    { "_class_wxPyValidator","_wxPyValidator",0},
-    { "_class_wxCloseEvent","_wxCloseEvent",0},
-    { "_wxBusyInfo","_class_wxBusyInfo",0},
-    { "_wxFontList","_class_wxFontList",0},
-    { "_class_wxMenuEvent","_wxMenuEvent",0},
-    { "_wxPaletteChangedEvent","_class_wxPaletteChangedEvent",0},
-    { "_class_wxPyBitmapDataObject","_wxPyBitmapDataObject",0},
-    { "_wxClientDC","_class_wxClientDC",0},
-    { "_wxMouseEvent","_class_wxMouseEvent",0},
-    { "_wxListCtrl","_class_wxListCtrl",0},
-    { "_class_wxPoint","_wxPoint",0},
-    { "_wxRealPoint","_class_wxRealPoint",0},
-    { "_class_wxRadioBox","_wxRadioBox",0},
+    { "_wxObject","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxObject},
+    { "_wxObject","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxObject},
+    { "_wxObject","_class_wxTreeEvent",SwigwxTreeEventTowxObject},
+    { "_wxObject","_wxTreeEvent",SwigwxTreeEventTowxObject},
+    { "_wxObject","_class_wxPyTreeItemData",SwigwxPyTreeItemDataTowxObject},
+    { "_wxObject","_wxPyTreeItemData",SwigwxPyTreeItemDataTowxObject},
+    { "_wxObject","_class_wxListCtrl",SwigwxListCtrlTowxObject},
+    { "_wxObject","_wxListCtrl",SwigwxListCtrlTowxObject},
+    { "_wxObject","_class_wxListEvent",SwigwxListEventTowxObject},
+    { "_wxObject","_wxListEvent",SwigwxListEventTowxObject},
+    { "_wxObject","_class_wxListItem",SwigwxListItemTowxObject},
+    { "_wxObject","_wxListItem",SwigwxListItemTowxObject},
     { "_signed_short","_WXTYPE",0},
     { "_signed_short","_short",0},
     { "_signed_short","_WXTYPE",0},
     { "_signed_short","_short",0},
-    { "_wxMemoryDC","_class_wxMemoryDC",0},
-    { "_wxPyTextDataObject","_class_wxPyTextDataObject",0},
-    { "_wxPaintDC","_class_wxPaintDC",0},
-    { "_class_wxWindowDC","_wxWindowDC",0},
-    { "_class_wxFocusEvent","_wxFocusEvent",0},
-    { "_class_wxMaximizeEvent","_wxMaximizeEvent",0},
-    { "_class_wxAcceleratorEntry","_wxAcceleratorEntry",0},
-    { "_class_wxCursor","_wxCursor",0},
-    { "_wxPostScriptDC","_class_wxPostScriptDC",0},
-    { "_wxPyFileDropTarget","_class_wxPyFileDropTarget",0},
-    { "_wxScrolledWindow","_class_wxScrolledWindow",0},
-    { "_wxTreeItemId","_class_wxTreeItemId",0},
     { "_unsigned_char","_byte",0},
     { "_unsigned_char","_byte",0},
-    { "_class_wxMenu","_wxMenu",0},
     { "_wxControl","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl},
     { "_wxControl","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl},
     { "_wxControl","_class_wxListCtrl",SwigwxListCtrlTowxControl},
     { "_wxControl","_wxListCtrl",SwigwxListCtrlTowxControl},
     { "_wxControl","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl},
     { "_wxControl","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl},
     { "_wxControl","_class_wxListCtrl",SwigwxListCtrlTowxControl},
     { "_wxControl","_wxListCtrl",SwigwxListCtrlTowxControl},
-    { "_wxControl","_class_wxControl",0},
-    { "_class_wxListBox","_wxListBox",0},
     { "_unsigned_int","_wxCoord",0},
     { "_unsigned_int","_wxPrintQuality",0},
     { "_unsigned_int","_time_t",0},
     { "_unsigned_int","_wxCoord",0},
     { "_unsigned_int","_wxPrintQuality",0},
     { "_unsigned_int","_time_t",0},
@@ -8177,23 +8244,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_unsigned_int","_uint",0},
     { "_unsigned_int","_wxWindowID",0},
     { "_unsigned_int","_int",0},
     { "_unsigned_int","_uint",0},
     { "_unsigned_int","_wxWindowID",0},
     { "_unsigned_int","_int",0},
-    { "_wxIcon","_class_wxIcon",0},
-    { "_wxDialog","_class_wxDialog",0},
-    { "_class_wxListItem","_wxListItem",0},
-    { "_class_wxPen","_wxPen",0},
     { "_short","_WXTYPE",0},
     { "_short","_unsigned_short",0},
     { "_short","_signed_short",0},
     { "_short","_WXTYPE",0},
     { "_short","_unsigned_short",0},
     { "_short","_signed_short",0},
-    { "_class_wxStaticBox","_wxStaticBox",0},
-    { "_class_wxPyDataObjectSimple","_wxPyDataObjectSimple",0},
-    { "_class_wxPyDropSource","_wxPyDropSource",0},
-    { "_class_wxScrollEvent","_wxScrollEvent",0},
-    { "_wxJoystickEvent","_class_wxJoystickEvent",0},
-    { "_class_wxChoice","_wxChoice",0},
-    { "_class_wxSlider","_wxSlider",0},
-    { "_class_wxImageList","_wxImageList",0},
-    { "_class_wxBitmapButton","_wxBitmapButton",0},
-    { "_class_wxPaletteChangedEvent","_wxPaletteChangedEvent",0},
     { "_wxWindowID","_wxCoord",0},
     { "_wxWindowID","_wxPrintQuality",0},
     { "_wxWindowID","_time_t",0},
     { "_wxWindowID","_wxCoord",0},
     { "_wxWindowID","_wxPrintQuality",0},
     { "_wxWindowID","_time_t",0},
@@ -8203,7 +8256,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_wxWindowID","_int",0},
     { "_wxWindowID","_signed_int",0},
     { "_wxWindowID","_unsigned_int",0},
     { "_wxWindowID","_int",0},
     { "_wxWindowID","_signed_int",0},
     { "_wxWindowID","_unsigned_int",0},
-    { "_class_wxScrollWinEvent","_wxScrollWinEvent",0},
     { "_int","_wxCoord",0},
     { "_int","_wxPrintQuality",0},
     { "_int","_time_t",0},
     { "_int","_wxCoord",0},
     { "_int","_wxPrintQuality",0},
     { "_int","_time_t",0},
@@ -8213,11 +8265,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_int","_wxWindowID",0},
     { "_int","_unsigned_int",0},
     { "_int","_signed_int",0},
     { "_int","_wxWindowID",0},
     { "_int","_unsigned_int",0},
     { "_int","_signed_int",0},
-    { "_class_wxMouseEvent","_wxMouseEvent",0},
-    { "_wxPyCommandEvent","_class_wxPyCommandEvent",0},
-    { "_class_wxListEvent","_wxListEvent",0},
-    { "_class_wxSpinEvent","_wxSpinEvent",0},
-    { "_class_wxQueryNewPaletteEvent","_wxQueryNewPaletteEvent",0},
     { "_time_t","_wxCoord",0},
     { "_time_t","_wxPrintQuality",0},
     { "_time_t","_unsigned_int",0},
     { "_time_t","_wxCoord",0},
     { "_time_t","_wxPrintQuality",0},
     { "_time_t","_unsigned_int",0},
@@ -8225,33 +8272,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_time_t","_wxWindowID",0},
     { "_time_t","_uint",0},
     { "_time_t","_size_t",0},
     { "_time_t","_wxWindowID",0},
     { "_time_t","_uint",0},
     { "_time_t","_size_t",0},
-    { "_class_wxNavigationKeyEvent","_wxNavigationKeyEvent",0},
-    { "_wxButton","_class_wxButton",0},
-    { "_wxSize","_class_wxSize",0},
-    { "_wxRegionIterator","_class_wxRegionIterator",0},
-    { "_class_wxPyTextDataObject","_wxPyTextDataObject",0},
-    { "_wxPyTreeItemData","_class_wxPyTreeItemData",0},
-    { "_class_wxPaintDC","_wxPaintDC",0},
-    { "_class_wxSysColourChangedEvent","_wxSysColourChangedEvent",0},
-    { "_class_wxPyFileDropTarget","_wxPyFileDropTarget",0},
-    { "_class_wxInitDialogEvent","_wxInitDialogEvent",0},
-    { "_class_wxComboBox","_wxComboBox",0},
-    { "_class_wxRadioButton","_wxRadioButton",0},
-    { "_wxValidator","_class_wxValidator",0},
-    { "_class_wxTreeItemId","_wxTreeItemId",0},
-    { "_class_wxLayoutConstraints","_wxLayoutConstraints",0},
-    { "_wxIconizeEvent","_class_wxIconizeEvent",0},
     { "_class_wxControl","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl},
     { "_class_wxControl","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl},
     { "_class_wxControl","_class_wxListCtrl",SwigwxListCtrlTowxControl},
     { "_class_wxControl","_wxListCtrl",SwigwxListCtrlTowxControl},
     { "_class_wxControl","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl},
     { "_class_wxControl","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxControl},
     { "_class_wxControl","_class_wxListCtrl",SwigwxListCtrlTowxControl},
     { "_class_wxControl","_wxListCtrl",SwigwxListCtrlTowxControl},
-    { "_class_wxControl","_wxControl",0},
-    { "_wxStaticBitmap","_class_wxStaticBitmap",0},
-    { "_class_wxIcon","_wxIcon",0},
-    { "_class_wxColour","_wxColour",0},
-    { "_class_wxScreenDC","_wxScreenDC",0},
-    { "_wxPalette","_class_wxPalette",0},
-    { "_class_wxIdleEvent","_wxIdleEvent",0},
     { "_wxCoord","_int",0},
     { "_wxCoord","_signed_int",0},
     { "_wxCoord","_unsigned_int",0},
     { "_wxCoord","_int",0},
     { "_wxCoord","_signed_int",0},
     { "_wxCoord","_unsigned_int",0},
@@ -8261,54 +8285,18 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
     { "_wxCoord","_size_t",0},
     { "_wxCoord","_time_t",0},
     { "_wxCoord","_wxPrintQuality",0},
     { "_wxCoord","_size_t",0},
     { "_wxCoord","_time_t",0},
     { "_wxCoord","_wxPrintQuality",0},
-    { "_wxEraseEvent","_class_wxEraseEvent",0},
-    { "_wxDataObjectComposite","_class_wxDataObjectComposite",0},
-    { "_class_wxJoystickEvent","_wxJoystickEvent",0},
-    { "_wxRegion","_class_wxRegion",0},
-    { "_class_wxShowEvent","_wxShowEvent",0},
-    { "_wxPyDropTarget","_class_wxPyDropTarget",0},
-    { "_wxActivateEvent","_class_wxActivateEvent",0},
-    { "_wxGauge","_class_wxGauge",0},
-    { "_class_wxCheckListBox","_wxCheckListBox",0},
-    { "_class_wxBusyInfo","_wxBusyInfo",0},
-    { "_class_wxFontList","_wxFontList",0},
     { "_class_wxCommandEvent","_class_wxTreeEvent",SwigwxTreeEventTowxCommandEvent},
     { "_class_wxCommandEvent","_wxTreeEvent",SwigwxTreeEventTowxCommandEvent},
     { "_class_wxCommandEvent","_class_wxListEvent",SwigwxListEventTowxCommandEvent},
     { "_class_wxCommandEvent","_wxListEvent",SwigwxListEventTowxCommandEvent},
     { "_class_wxCommandEvent","_class_wxTreeEvent",SwigwxTreeEventTowxCommandEvent},
     { "_class_wxCommandEvent","_wxTreeEvent",SwigwxTreeEventTowxCommandEvent},
     { "_class_wxCommandEvent","_class_wxListEvent",SwigwxListEventTowxCommandEvent},
     { "_class_wxCommandEvent","_wxListEvent",SwigwxListEventTowxCommandEvent},
-    { "_class_wxCommandEvent","_wxCommandEvent",0},
-    { "_class_wxClientDC","_wxClientDC",0},
-    { "_class_wxSizeEvent","_wxSizeEvent",0},
-    { "_class_wxListCtrl","_wxListCtrl",0},
-    { "_wxBrushList","_class_wxBrushList",0},
-    { "_wxCustomDataObject","_class_wxCustomDataObject",0},
-    { "_class_wxSize","_wxSize",0},
-    { "_class_wxBitmap","_wxBitmap",0},
-    { "_class_wxMemoryDC","_wxMemoryDC",0},
-    { "_wxPyTextDropTarget","_class_wxPyTextDropTarget",0},
-    { "_wxMenuBar","_class_wxMenuBar",0},
-    { "_wxTreeEvent","_class_wxTreeEvent",0},
     { "_wxEvtHandler","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler},
     { "_wxEvtHandler","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler},
     { "_wxEvtHandler","_class_wxListCtrl",SwigwxListCtrlTowxEvtHandler},
     { "_wxEvtHandler","_wxListCtrl",SwigwxListCtrlTowxEvtHandler},
     { "_wxEvtHandler","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler},
     { "_wxEvtHandler","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxEvtHandler},
     { "_wxEvtHandler","_class_wxListCtrl",SwigwxListCtrlTowxEvtHandler},
     { "_wxEvtHandler","_wxListCtrl",SwigwxListCtrlTowxEvtHandler},
-    { "_wxEvtHandler","_class_wxEvtHandler",0},
-    { "_wxMenuItem","_class_wxMenuItem",0},
-    { "_class_wxScrollBar","_wxScrollBar",0},
-    { "_class_wxScrolledWindow","_wxScrolledWindow",0},
-    { "_wxListItemAttr","_class_wxListItemAttr",0},
-    { "_wxKeyEvent","_class_wxKeyEvent",0},
-    { "_wxMoveEvent","_class_wxMoveEvent",0},
-    { "_class_wxPalette","_wxPalette",0},
-    { "_wxFileDataObject","_class_wxFileDataObject",0},
-    { "_class_wxEraseEvent","_wxEraseEvent",0},
-    { "_class_wxDataObjectComposite","_wxDataObjectComposite",0},
     { "_wxWindow","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow},
     { "_wxWindow","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow},
     { "_wxWindow","_class_wxListCtrl",SwigwxListCtrlTowxWindow},
     { "_wxWindow","_wxListCtrl",SwigwxListCtrlTowxWindow},
     { "_wxWindow","_class_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow},
     { "_wxWindow","_wxPyTreeCtrl",SwigwxPyTreeCtrlTowxWindow},
     { "_wxWindow","_class_wxListCtrl",SwigwxListCtrlTowxWindow},
     { "_wxWindow","_wxListCtrl",SwigwxListCtrlTowxWindow},
-    { "_wxWindow","_class_wxWindow",0},
-    { "_class_wxWindowDestroyEvent","_wxWindowDestroyEvent",0},
 {0,0,0}};
 
 static PyObject *SWIG_globals;
 {0,0,0}};
 
 static PyObject *SWIG_globals;
@@ -8379,6 +8367,26 @@ SWIGEXPORT(void) initcontrols2c() {
         PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_ITEM_ACTIVATED", PyInt_FromLong((long) wxEVT_COMMAND_LIST_ITEM_ACTIVATED));
         PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK));
         PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK));
         PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_ITEM_ACTIVATED", PyInt_FromLong((long) wxEVT_COMMAND_LIST_ITEM_ACTIVATED));
         PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK));
         PyDict_SetItemString(d,"wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK));
+        PyDict_SetItemString(d,"wxLC_ICON", PyInt_FromLong((long) wxLC_ICON));
+        PyDict_SetItemString(d,"wxLC_SMALL_ICON", PyInt_FromLong((long) wxLC_SMALL_ICON));
+        PyDict_SetItemString(d,"wxLC_LIST", PyInt_FromLong((long) wxLC_LIST));
+        PyDict_SetItemString(d,"wxLC_REPORT", PyInt_FromLong((long) wxLC_REPORT));
+        PyDict_SetItemString(d,"wxLC_ALIGN_TOP", PyInt_FromLong((long) wxLC_ALIGN_TOP));
+        PyDict_SetItemString(d,"wxLC_ALIGN_LEFT", PyInt_FromLong((long) wxLC_ALIGN_LEFT));
+        PyDict_SetItemString(d,"wxLC_AUTOARRANGE", PyInt_FromLong((long) wxLC_AUTOARRANGE));
+        PyDict_SetItemString(d,"wxLC_USER_TEXT", PyInt_FromLong((long) wxLC_USER_TEXT));
+        PyDict_SetItemString(d,"wxLC_EDIT_LABELS", PyInt_FromLong((long) wxLC_EDIT_LABELS));
+        PyDict_SetItemString(d,"wxLC_NO_HEADER", PyInt_FromLong((long) wxLC_NO_HEADER));
+        PyDict_SetItemString(d,"wxLC_NO_SORT_HEADER", PyInt_FromLong((long) wxLC_NO_SORT_HEADER));
+        PyDict_SetItemString(d,"wxLC_SINGLE_SEL", PyInt_FromLong((long) wxLC_SINGLE_SEL));
+        PyDict_SetItemString(d,"wxLC_SORT_ASCENDING", PyInt_FromLong((long) wxLC_SORT_ASCENDING));
+        PyDict_SetItemString(d,"wxLC_SORT_DESCENDING", PyInt_FromLong((long) wxLC_SORT_DESCENDING));
+        PyDict_SetItemString(d,"wxLC_MASK_TYPE", PyInt_FromLong((long) wxLC_MASK_TYPE));
+        PyDict_SetItemString(d,"wxLC_MASK_ALIGN", PyInt_FromLong((long) wxLC_MASK_ALIGN));
+        PyDict_SetItemString(d,"wxLC_MASK_SORT", PyInt_FromLong((long) wxLC_MASK_SORT));
+        PyDict_SetItemString(d,"wxLC_HRULES", PyInt_FromLong((long) wxLC_HRULES));
+        PyDict_SetItemString(d,"wxLC_VRULES", PyInt_FromLong((long) wxLC_VRULES));
+        PyDict_SetItemString(d,"wxLC_VIRTUAL", PyInt_FromLong((long) wxLC_VIRTUAL));
         PyDict_SetItemString(d,"wxTreeItemIcon_Normal", PyInt_FromLong((long) wxTreeItemIcon_Normal));
         PyDict_SetItemString(d,"wxTreeItemIcon_Selected", PyInt_FromLong((long) wxTreeItemIcon_Selected));
         PyDict_SetItemString(d,"wxTreeItemIcon_Expanded", PyInt_FromLong((long) wxTreeItemIcon_Expanded));
         PyDict_SetItemString(d,"wxTreeItemIcon_Normal", PyInt_FromLong((long) wxTreeItemIcon_Normal));
         PyDict_SetItemString(d,"wxTreeItemIcon_Selected", PyInt_FromLong((long) wxTreeItemIcon_Selected));
         PyDict_SetItemString(d,"wxTreeItemIcon_Expanded", PyInt_FromLong((long) wxTreeItemIcon_Expanded));
@@ -8415,6 +8423,10 @@ SWIGEXPORT(void) initcontrols2c() {
         PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_ACTIVATED", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_ACTIVATED));
         PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK));
         PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK));
         PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_ACTIVATED", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_ACTIVATED));
         PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK));
         PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK", PyInt_FromLong((long) wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK));
+        PyDict_SetItemString(d,"wxEVT_COMMAND_TREE_END_DRAG", PyInt_FromLong((long) wxEVT_COMMAND_TREE_END_DRAG));
+
+    wxPyPtrTypeMap_Add("wxTreeItemData", "wxPyTreeItemData");
+    wxPyPtrTypeMap_Add("wxTreeCtrl", "wxPyTreeCtrl");
 {
    int i;
    for (i = 0; _swig_mapping[i].n1; i++)
 {
    int i;
    for (i = 0; _swig_mapping[i].n1; i++)