X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/137b5242b1834999da2883c7a68fbde28c6fba37..53663be8a5ea8e1c6f178839209b67e8228e4642:/wxPython/src/msw/htmlhelp.py diff --git a/wxPython/src/msw/htmlhelp.py b/wxPython/src/msw/htmlhelp.py index 3dc8c51812..33fdd1e5df 100644 --- a/wxPython/src/msw/htmlhelp.py +++ b/wxPython/src/msw/htmlhelp.py @@ -9,6 +9,8 @@ from windows import * from gdi import * +from fonts import * + from clip_dnd import * from events import * @@ -40,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 @@ -152,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 @@ -244,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