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 13:51:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 61
Message-ID: <g64ok7$85t$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> <g64nif$o5d$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 1216734663 8381 172.30.248.38 (22 Jul 2008 13:51:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 22 Jul 2008 13:51:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 791003
Xref: news.mathworks.com comp.soft-sys.matlab:480958



"ching l" <chinglnc@hotmail.com> wrote in message 
<g64nif$o5d$1@fred.mathworks.com>...
> "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?

that depends.  what value does that function set if it 
isn't called?  seems to me it could be anything you wanted 
it to be.