Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Gui multiple instances
Date: Wed, 4 Nov 2009 21:16:20 +0000 (UTC)
Organization: Univ of Huddersfield
Lines: 13
Message-ID: <hcsqv4$63n$1@fred.mathworks.com>
References: <hcq5l4$hek$1@fred.mathworks.com> <hcq938$meu$1@fred.mathworks.com> <hcsfh0$7ag$1@fred.mathworks.com> <hcshts$7b8$1@fred.mathworks.com> <hcskcj$ao9$1@fred.mathworks.com> <hcsm13$onn$1@fred.mathworks.com> <hcsohp$4lb$1@fred.mathworks.com> <hcspjf$a91$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257369380 6263 172.30.248.35 (4 Nov 2009 21:16:20 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 4 Nov 2009 21:16:20 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 672361
Xref: news.mathworks.com comp.soft-sys.matlab:582524


I've made that change thanks code now looks like:

% Check to see if an instance of GUI is already running -----------------
set(0,'showhiddenhandles','on');
p = findobj('tag','uis','parent',0);
set(0,'showhiddenhandles','off');
if any(ishandle(p))
    figure(p);
    msgbox('Simulate Data is already open.','createMode','modal');
    return;
end

and is working :D