X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/174051f6139a05e5bc5a2ba101534a4742e3afb1..2706d2fedee4cfc34ba0c838bd157bc0d9718ce1:/wxPython/src/_treectrl.i diff --git a/wxPython/src/_treectrl.i b/wxPython/src/_treectrl.i index fe91fc9e05..c10298c9b5 100644 --- a/wxPython/src/_treectrl.i +++ b/wxPython/src/_treectrl.i @@ -309,6 +309,8 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyTreeCtrl, wxTreeCtrl); +MustHaveApp(wxPyTreeCtrl); + %name(TreeCtrl)class wxPyTreeCtrl : public wxControl { public: %pythonAppend wxPyTreeCtrl "self._setOORInfo(self);self._setCallbackInfo(self, TreeCtrl)" @@ -510,6 +512,7 @@ public: wxTreeItemId *tii = new wxTreeItemId(array.Item(x)); PyObject* item = wxPyConstructObject((void*)tii, wxT("wxTreeItemId"), True); PyList_Append(rval, item); + Py_DECREF(item); } wxPyEndBlockThreads(blocked); return rval; @@ -521,6 +524,8 @@ public: wxTreeItemId GetItemParent(const wxTreeItemId& item) const; + // NOTE: These are a copy of the same methods in gizmos.i, be sure to + // update both at the same time. (Or find a good way to refactor!) %extend { // Get the first child of this item. Returns a wxTreeItemId and an // opaque "cookie" value that should be passed to GetNextChild in @@ -685,10 +690,10 @@ public: DocDeclAStr( wxTreeItemId, HitTest(const wxPoint& point, int& OUTPUT), "HitTest(Point point) -> (item, where)", - "Determine which item (if any) belongs the given point. The\n" - "coordinates specified are relative to the client area of tree ctrl\n" - "and the where return value is set to a bitmask of wxTREE_HITTEST_xxx\n" - "constants.\n"); + "Determine which item (if any) belongs the given point. The coordinates +specified are relative to the client area of tree ctrl and the where return +value is set to a bitmask of wxTREE_HITTEST_xxx constants. +", ""); %extend {