Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: default value when no callback
Date: Tue, 22 Jul 2008 12:40:25 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 42
Message-ID: <g64kfp$d8l$1@fred.mathworks.com>
References: <g64169$dj3$1@fred.mathworks.com> <g64c2t$e03$1@fred.mathworks.com> <g64k02$7h4$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1216730425 13589 172.30.248.38 (22 Jul 2008 12:40:25 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 22 Jul 2008 12:40:25 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 791003
Xref: news.mathworks.com comp.soft-sys.matlab:480921



"ching l" <chinglnc@hotmail.com> wrote in message <g64k02
$7h4$1@fred.mathworks.com>...
> "David " <dave@bigcompany.com> wrote in message
> <g64c2t$e03$1@fred.mathworks.com>...
> > "ching l" <chinglnc@hotmail.com> wrote in message 
<g64169
> > $dj3$1@fred.mathworks.com>...
> > > How to put a default value of the callback if it's 
not 
> > being
> > > called? so that there is always a value even it's 
not 
> > being
> > > used. Like this?
> > > 
> > > 
> > > function  answer_nochange_Callback(hObject, 
eventdata, 
> > handles)
> > > 
> > > handles.n= [1, 2, 0] 
> > > 
> > > 
> > > if handles.n <= 0
> > >    handles.n= 99;
> > >    
> > > end
> > > 
> > > 
> > > 
> > 
> > if a function isn't called in the program, and no one 
is 
> > around to hear it, does it make a return?
> > 
> > sorry, must be the low caffeine level this morning.
> > 
> yea..i know it sounds stupid...but I really need a value
> there even the function is not called..

then in the function that doesn't call that function you 
should set the default value.