Callback executed when the main figure closes M Hewitson $Id: cb_mainfigClose.html,v 1.10 2008/03/31 10:27:44 hewitson Exp $
0001 function cb_mainfigClose(varargin) 0002 0003 % Callback executed when the main figure closes 0004 % 0005 % M Hewitson 0006 % 0007 % $Id: cb_mainfigClose.html,v 1.10 2008/03/31 10:27:44 hewitson Exp $ 0008 % 0009 0010 % Close open connection 0011 conn = getappdata(varargin{1}, 'connection'); 0012 if isa(conn, 'database') 0013 disp('* closing database connection'); 0014 close(conn); 0015 end 0016 0017 disp('* Goodbye from the LTPDA Repository GUI *') 0018 delete(varargin{1}) 0019 0020 0021 0022