"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.
"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..
"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.
"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?
"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.
"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?
when the function is not called, I want it to have a value
of 99.
I just need to know that that particular function/callback
is not being used.
Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central. Read the complete Disclaimer prior to use.