X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a323d3bda70a87bdfe11c835617185dd8060724c..6678c7f83894bc750cebb129d9575f5768eda174:/wxPython/src/gtk/htmlhelp.py diff --git a/wxPython/src/gtk/htmlhelp.py b/wxPython/src/gtk/htmlhelp.py index 881c662aa0..33fdd1e5df 100644 --- a/wxPython/src/gtk/htmlhelp.py +++ b/wxPython/src/gtk/htmlhelp.py @@ -42,7 +42,7 @@ from printfw import * from sizers import * from filesys import * -class wxHtmlBookRecordPtr(wxObjectPtr): +class wxHtmlBookRecordPtr : def __init__(self,this): self.this = this self.thisown = 0 @@ -154,9 +154,12 @@ class wxHtmlHelpDataPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,htmlhelpc=htmlhelpc): - if self.thisown == 1 : - htmlhelpc.delete_wxHtmlHelpData(self) + def __del__(self, delfunc=htmlhelpc.delete_wxHtmlHelpData): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetTempDir(self, *_args, **_kwargs): val = apply(htmlhelpc.wxHtmlHelpData_SetTempDir,(self,) + _args, _kwargs) return val @@ -246,9 +249,12 @@ class wxHtmlHelpControllerPtr(wxEvtHandlerPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,htmlhelpc=htmlhelpc): - if self.thisown == 1 : - htmlhelpc.delete_wxHtmlHelpController(self) + def __del__(self, delfunc=htmlhelpc.delete_wxHtmlHelpController): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetTitleFormat(self, *_args, **_kwargs): val = apply(htmlhelpc.wxHtmlHelpController_SetTitleFormat,(self,) + _args, _kwargs) return val