rval = *ptr;
}
else if (PySequence_Check(ro) && PyObject_Length(ro) == 2) {
+ PyErr_Clear(); // Clear the exception left over from wxPyConvertSwigPtr
PyObject* o1 = PySequence_GetItem(ro, 0);
PyObject* o2 = PySequence_GetItem(ro, 1);
if (PyNumber_Check(o1) && PyNumber_Check(o2))
// Let SWIG know about it so it can create the Python version
class wxPyGridCellRenderer : public wxGridCellRenderer {
public:
- %pythonAppend wxPyGridCellRenderer "self._setCallbackInfo(self, PyGridCellRenderer);self._setOORInfo(self)"
+ %pythonAppend wxPyGridCellRenderer "self._setOORInfo(self);" setCallbackInfo(PyGridCellRenderer);
wxPyGridCellRenderer();
void _setCallbackInfo(PyObject* self, PyObject* _class);
// Let SWIG know about it so it can create the Python version
class wxPyGridCellEditor : public wxGridCellEditor {
public:
- %pythonAppend wxPyGridCellEditor "self._setCallbackInfo(self, PyGridCellEditor);self._setOORInfo(self)"
+ %pythonAppend wxPyGridCellEditor "self._setOORInfo(self);" setCallbackInfo(PyGridCellEditor)
wxPyGridCellEditor();
void _setCallbackInfo(PyObject* self, PyObject* _class);
class wxPyGridCellAttrProvider : public wxGridCellAttrProvider
{
public:
- %pythonAppend wxPyGridCellAttrProvider "self._setCallbackInfo(self, PyGridCellAttrProvider)"
+ %pythonAppend wxPyGridCellAttrProvider setCallbackInfo(PyGridCellAttrProvider)
wxPyGridCellAttrProvider();
void _setCallbackInfo(PyObject* self, PyObject* _class);
class wxPyGridTableBase : public wxGridTableBase
{
public:
- %pythonAppend wxPyGridTableBase "self._setCallbackInfo(self, PyGridTableBase);self._setOORInfo(self)"
+ %pythonAppend wxPyGridTableBase "self._setOORInfo(self);" setCallbackInfo(PyGridTableBase)
wxPyGridTableBase();
void _setCallbackInfo(PyObject* self, PyObject* _class);
def __str__(self): return str(self.Get())
def __repr__(self): return 'wxGridCellCoords'+str(self.Get())
def __len__(self): return len(self.Get())
- def __getitem__(self, index): return self.asTuple()[index]
+ def __getitem__(self, index): return self.Get()[index]
def __setitem__(self, index, val):
if index == 0: self.SetRow(val)
elif index == 1: self.SetCol(val)