Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Gui multiple instances
Date: Wed, 4 Nov 2009 20:35:06 +0000 (UTC)
Organization: Univ of Huddersfield
Lines: 19
Message-ID: <hcsohp$4lb$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>
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 1257366906 4779 172.30.248.35 (4 Nov 2009 20:35:06 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 4 Nov 2009 20:35:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 672361
Xref: news.mathworks.com comp.soft-sys.matlab:582517


>   And can I prevent a new window opening in 7.0.1?
> 
> % Maybe instead of:
> if ~isempty(p)
> % you can try:
> if ishandle(p)
> 
> % And if you are really paranoid, you can test if p is ONLY a
> % figure handle by testing whether the 'Parent' property is root.

Thanks,
I have changed my condition to ishandle.  
The new figure window in 7.0.1 was caused by the way I had findobj.  I have now changed this to:

p=findobj('tag','uis','parent',0)

and it seems to be working fine in both versions of Matlab.

Thanks agin for your time, it's much appreciated.