Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: GUI: hangs up
Date: Thu, 25 Oct 2007 15:45:47 +0000 (UTC)
Organization: Ford Motor Co
Lines: 32
Message-ID: <ffqdnb$plo$1@fred.mathworks.com>
References: <fedl3p$373$1@fred.mathworks.com> <ff586i$jqp$1@fred.mathworks.com> <ffnk2g$qmi$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 1193327147 26296 172.30.248.35 (25 Oct 2007 15:45:47 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 25 Oct 2007 15:45:47 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 35831
Xref: news.mathworks.com comp.soft-sys.matlab:434625



I am pretty confident that the cause of the GUI hangs up 
is the one I explained before.

You seem to have a quite complex GUI. Can you step through 
your code to pinpoint the place that causes the hangs up? 
You must know the place where you give the last input to 
your GUI and your code starts to run but the GUI hangs up. 
Put a pause statement there. You have to strike a key then 
to let the code continue. See if the GUI still hangs up. I 
predict you won't have GUI hangs up when you step through 
your code.

My experience is, to make the pause(0.2) work, it has to 
be added after every place where there is a need to 
refresh the GUI and there is intensive calculations 
following. Examples are like, questdlg(), inputdlg(), etc. 
For those dialog window, the window has to disappear after 
the user input. Adding a pause(0.2) statement after the 
questdlg() or inputdlg() statement prevents GUI hangs up 
in many of my cases. drawnow() or refresh() works 
sometimes but not as robust as pause().

If pause(0.2) is not enough, try to increase the time, 
maybe pause(0.5).

"Yogesh " <yogesh.parte.nospam@mathworks.com> wrote in 
message <ffnk2g$qmi$1@fred.mathworks.com>...
> Hello!
> Thank you for your reply and suggestion. But even after
> using pause command the problem persists.
> YP