]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/src/_extras.py
more unused param warnings fixed
[wxWidgets.git] / utils / wxPython / src / _extras.py
index a8a378d38129f2189d99014ab361b9a87be1537e..aa94aefeedb7a56463430630e1f625634086bef5 100644 (file)
@@ -666,6 +666,8 @@ wxPyDefaultSize.Set(-1,-1)
 wxDefaultPosition  = wxPyDefaultPosition
 wxDefaultSize      = wxPyDefaultSize
 
+# backwards compatibility
+wxNoRefBitmap      = wxBitmap
 
 #----------------------------------------------------------------------
 # This helper function will take a wxPython object and convert it to
@@ -695,7 +697,8 @@ def wxPyTypeCast(obj, typeStr):
         newPtr = ptrcast(obj, typeStr+"_p")
     theClass = globals()[typeStr+"Ptr"]
     theObj = theClass(newPtr)
-    theObj.thisown = obj.thisown
+    if hasattr(obj, "this"):
+        theObj.thisown = obj.thisown
     return theObj
 
 
@@ -780,6 +783,13 @@ class wxApp(wxPyApp):
         if self.stdioWin != None:
             self.stdioWin.close()
 
+#----------------------------------------------------------------------------
+
+class wxPySimpleApp(wxApp):
+    def __init__(self):
+        wxApp.__init__(self, 0)
+    def OnInit(self):
+        return true
 
 
 #----------------------------------------------------------------------------