[wxPython] RE: Minor problem in __del__ methods of wxIconPtr, wxBitmapPtr, w xImageListPtr

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] RE: Minor problem in __del__ methods of wxIconPtr, wxBitmapPtr, w xImageListPtr

Mike  Fletcher
Just upgraded to 2.1.13, tested the wxIconPtr, still encounters call of None
exceptions in the __del__ methods.  Wondering if this could be rolled into
the distribution to prevent scaring users with weird error messages.  Of
course, I'm guessing the same alteration might be done with any of the
pointer types, I just don't use them so have no tests to see if they cause
type errors.  If the problem is more complex than I'm making it out, please
let me know.

Thanks,
Mike

8<_________ "fixed" methods ____________

class wxImageListPtr :
    def __del__(self,gdic=gdic):
        if self.thisown == 1   and gdic and gdic.delete_wxImageList:
            gdic.delete_wxImageList(self)
class wxBitmapPtr :
    def __del__(self,gdic=gdic):
        if self.thisown == 1 and gdic and gdic.delete_wxBitmap :
            gdic.delete_wxBitmap(self)
class wxIconPtr(wxBitmapPtr):
    def __del__(self,gdic=gdic):
        if self.thisown == 1  and gdic and gdic.delete_wxIcon :
            gdic.delete_wxIcon(self)

8<________ error message __________
Exception exceptions.TypeError: 'call of non-function (type None)' in
<method wxIconPtr.__del__ of wxIcon instance at 960180> ignored
__________________________________
 Mike C. Fletcher
 Designer, VR Plumber
 http://members.home.com/mcfletch

_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users