]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/help.py
Calling a virtual function from a destructor is not good:
[wxWidgets.git] / wxPython / src / gtk / help.py
index ef92ad9ad48d8a6f03d3cf7e38763bc61c627cbe..ac1612ba19beae2f1f237824f356d0807e09fa9f 100644 (file)
@@ -61,34 +61,16 @@ class wxHelpEvent(wxHelpEventPtr):
 
 
 
 
 
 
-class wxContextMenuEventPtr(wxCommandEventPtr):
-    def __init__(self,this):
-        self.this = this
-        self.thisown = 0
-    def GetPosition(self, *_args, **_kwargs):
-        val = apply(helpc.wxContextMenuEvent_GetPosition,(self,) + _args, _kwargs)
-        if val: val = wxPointPtr(val) 
-        return val
-    def SetPosition(self, *_args, **_kwargs):
-        val = apply(helpc.wxContextMenuEvent_SetPosition,(self,) + _args, _kwargs)
-        return val
-    def __repr__(self):
-        return "<C wxContextMenuEvent instance at %s>" % (self.this,)
-class wxContextMenuEvent(wxContextMenuEventPtr):
-    def __init__(self,*_args,**_kwargs):
-        self.this = apply(helpc.new_wxContextMenuEvent,_args,_kwargs)
-        self.thisown = 1
-
-
-
-
 class wxContextHelpPtr(wxObjectPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
 class wxContextHelpPtr(wxObjectPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def __del__(self,helpc=helpc):
-        if self.thisown == 1 :
-            helpc.delete_wxContextHelp(self)
+    def __del__(self, delfunc=helpc.delete_wxContextHelp):
+        if self.thisown == 1:
+            try:
+                delfunc(self)
+            except:
+                pass
     def BeginContextHelp(self, *_args, **_kwargs):
         val = apply(helpc.wxContextHelp_BeginContextHelp,(self,) + _args, _kwargs)
         return val
     def BeginContextHelp(self, *_args, **_kwargs):
         val = apply(helpc.wxContextHelp_BeginContextHelp,(self,) + _args, _kwargs)
         return val
@@ -192,4 +174,4 @@ wxEVT_DETAILED_HELP = helpc.wxEVT_DETAILED_HELP
 # Stuff these names into the wx namespace so wxPyConstructObject can find them
 import wx
 wx.wxHelpEventPtr         = wxHelpEventPtr
 # Stuff these names into the wx namespace so wxPyConstructObject can find them
 import wx
 wx.wxHelpEventPtr         = wxHelpEventPtr
-wx.wxContextMenuEventPtr  = wxContextMenuEventPtr
+wx.wxContextHelpButtonPtr = wxContextHelpButtonPtr