www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mbcwidgets/@classicTable/pObjectBeingDestroyed.m

    function pObjectBeingDestroyed(obj, event)
%POBJECTBEINGDESTROYED called when the view is being destroyed
%
%  POBJECTBEINGDESTROYED(OBJ, EVENT)

%  Copyright 2006-2010 The MathWorks, Inc. and Ford Global Technologies, Inc.


obj.super('pObjectBeingDestroyed', event);

if ~mbcgui.util.isBeingDestroyed(obj.Parent)
    i_deleteobject(obj.hSliderbar);
    i_deleteobject(obj.vSliderbar);
    i_deleteobject(obj.TopRightCorner);
    i_deleteobject(obj.TopLeftCorner);
    i_deleteobject(obj.BottomRightCorner);
    i_deleteobject(obj.BottomLeftCorner);
    i_deleteobject(obj.EmptyTableComponent);
end

function i_deleteobject(obj)
if ishandle(obj)
    delete(obj)
end