]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/mac/printfw.py
added functions to read/write several elements at once (patch 754986)
[wxWidgets.git] / wxPython / src / mac / printfw.py
index 6265abcddf84587a36e8f0b7814ab5c70656e6dc..b9bbff171949d29946ed7e5bad1db39eb06e7537 100644 (file)
@@ -25,9 +25,12 @@ class wxPrintDataPtr(wxObjectPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def __del__(self,printfwc=printfwc):
-        if self.thisown == 1 :
-            printfwc.delete_wxPrintData(self)
+    def __del__(self, delfunc=printfwc.delete_wxPrintData):
+        if self.thisown == 1:
+            try:
+                delfunc(self)
+            except:
+                pass
     def GetNoCopies(self, *_args, **_kwargs):
         val = apply(printfwc.wxPrintData_GetNoCopies,(self,) + _args, _kwargs)
         return val
@@ -182,19 +185,17 @@ class wxPostScriptDC(wxPostScriptDCPtr):
 
 
 
-def wxPostScriptDC2(*_args,**_kwargs):
-    val = wxPostScriptDCPtr(apply(printfwc.new_wxPostScriptDC2,_args,_kwargs))
-    val.thisown = 1
-    return val
-
 
 class wxPageSetupDialogDataPtr(wxObjectPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def __del__(self,printfwc=printfwc):
-        if self.thisown == 1 :
-            printfwc.delete_wxPageSetupDialogData(self)
+    def __del__(self, delfunc=printfwc.delete_wxPageSetupDialogData):
+        if self.thisown == 1:
+            try:
+                delfunc(self)
+            except:
+                pass
     def EnableHelp(self, *_args, **_kwargs):
         val = apply(printfwc.wxPageSetupDialogData_EnableHelp,(self,) + _args, _kwargs)
         return val
@@ -324,9 +325,12 @@ class wxPrintDialogDataPtr(wxObjectPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def __del__(self,printfwc=printfwc):
-        if self.thisown == 1 :
-            printfwc.delete_wxPrintDialogData(self)
+    def __del__(self, delfunc=printfwc.delete_wxPrintDialogData):
+        if self.thisown == 1:
+            try:
+                delfunc(self)
+            except:
+                pass
     def EnableHelp(self, *_args, **_kwargs):
         val = apply(printfwc.wxPrintDialogData_EnableHelp,(self,) + _args, _kwargs)
         return val
@@ -496,9 +500,12 @@ class wxPrinterPtr(wxObjectPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def __del__(self,printfwc=printfwc):
-        if self.thisown == 1 :
-            printfwc.delete_wxPrinter(self)
+    def __del__(self, delfunc=printfwc.delete_wxPrinter):
+        if self.thisown == 1:
+            try:
+                delfunc(self)
+            except:
+                pass
     def CreateAbortWindow(self, *_args, **_kwargs):
         val = apply(printfwc.wxPrinter_CreateAbortWindow,(self,) + _args, _kwargs)
         return val