Path: news.mathworks.com!not-for-mail
From: "ching l" <chinglnc@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: default value when no callback
Date: Tue, 22 Jul 2008 13:33:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 49
Message-ID: <g64nif$o5d$1@fred.mathworks.com>
References: <g64169$dj3$1@fred.mathworks.com> <g64c2t$e03$1@fred.mathworks.com> <g64k02$7h4$1@fred.mathworks.com> <g64kfp$d8l$1@fred.mathworks.com>
Reply-To: "ching l" <chinglnc@hotmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1216733583 24749 172.30.248.37 (22 Jul 2008 13:33:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 22 Jul 2008 13:33:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1438759
Xref: news.mathworks.com comp.soft-sys.matlab:480946



"David " <dave@bigcompany.com> wrote in message
<g64kfp$d8l$1@fred.mathworks.com>...
> "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 fun
ction you 
> should set the default value.

yeah..the question was how to set the default value?

(set, '0', 'default') is not right?