Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Event queuing , callbacks and buttons
Date: Tue, 12 Feb 2008 09:42:01 +0000 (UTC)
Organization: University of Freiburg
Lines: 22
Message-ID: <forpl9$8cv$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 1202809321 8607 172.30.248.35 (12 Feb 2008 09:42:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 12 Feb 2008 09:42:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1231496
Xref: news.mathworks.com comp.soft-sys.matlab:450744



Hello,

I've a gui with a button which increases an interpolation
number. The button then calls a plot function which takes
about 2 seconds to draw. So when the user presses the button
several times the value increases and the plot function is
also called several times which takes really a long time.
What I want to do is to only execute the last call of the
interpolation button. In other words the preceeding calls
should be canceled and only the last call should be
processed. I've read a lot in the newsgroup but didn't find
a satisfying answer. I also have no while or for loops in my
plot function. So the question is, how can I stop the
running plot function?

Remarks: I don't want to cancel upcoming events I only want
to process the latest call of the interpolation button.

I hope I made myself clear and would  appreciate any answer.

Thanks and greetings,
Johannes.