From 2321b3c7786afc0be62ff273108be39e31e8ccc9 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 9 Apr 2003 19:28:38 +0000 Subject: [PATCH] Added __nonzero__ method to wxTreeItemId. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/controls2.i | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wxPython/src/controls2.i b/wxPython/src/controls2.i index 9ace2b41ff..82116bb914 100644 --- a/wxPython/src/controls2.i +++ b/wxPython/src/controls2.i @@ -1003,7 +1003,11 @@ public: wxTreeItemId(); ~wxTreeItemId(); bool IsOk(); - %pragma(python) addtoclass = "Ok = IsOk" + %pragma(python) addtoclass = " + Ok = IsOk + def __nonzero__(self): + return self.IsOk() +" %addmethods { int __cmp__(wxTreeItemId* other) {