gui/component.py
def destroy(self):
        "Remove event references and destroy wx object (and children)"
        # unreference the obj from the components map and parent
        if self._name:
            del COMPONENTS[self._get_fully_qualified_name()]
            if DEBUG: print "deleted from components!"
            if isinstance(self._parent, Component):
                del self._parent[self._name]
                if DEBUG: print "deleted from parent!"
        # destroy the wx_obj (only if sure that reference is not needed!)
        if self.wx_obj:
            self.wx_obj.Destroy()
            for child in self:
                print "destroying child", 
                child.destroy()
        # destroy the designer selection marker (if any)
        if hasattr(self, 'sel_marker') and self.sel_marker:
            self.sel_marker.destroy()
        if hasattr(self, 'facade') and self.facade:
            self.facade.destroy()
def destroy(self):
        "Remove event references and destroy wx object (and children)"
        # unreference the obj from the components map and parent
        if self._name:
            del COMPONENTS[self._get_fully_qualified_name()]
            if DEBUG: print "deleted from components!"
            if isinstance(self._parent, Component):
                del self._parent[self._name]
                if DEBUG: print "deleted from parent!"
        # destroy the wx_obj (only if sure that reference is not needed!)
        if self.wx_obj:
            self.wx_obj.Destroy()
            for child in self:
                print "destroying child", 
                child.destroy()
        # destroy the designer selection marker (if any)
        if hasattr(self, 'sel_marker') and self.sel_marker:
            self.sel_marker.destroy()
        if hasattr(self, 'facade') and self.facade:
            self.facade.destroy()
Remove event references and destroy wx object (and children)