Path: news.mathworks.com!not-for-mail
From: "ching l" <chinglnc@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: pass value to the next function
Date: Tue, 21 Jul 2009 07:26:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 46
Message-ID: <h43qi9$ob0$1@fred.mathworks.com>
References: <h42q9o$otn$1@fred.mathworks.com>
Reply-To: "ching l" <chinglnc@hotmail.com>
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 1248161161 24928 172.30.248.38 (21 Jul 2009 07:26:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 21 Jul 2009 07:26:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1438759
Xref: news.mathworks.com comp.soft-sys.matlab:557023


"ching l" <chinglnc@hotmail.com> wrote in message <h42q9o$otn$1@fred.mathworks.com>...
> How do I pass the handles.count value from the select_audio Callback function 
> to the next_Callback function?
> 
> I want to enable the pushbutton on next_Callback function when the select_audio Callback is disable.
> 
> 
> ---------------------
> 
> function select_audio_Callback(hObject, eventdata, handles)
> 
> handles = guidata(gcbo); 
> 
> if(handles.count <= 2) 
> 
> handles.count= handles.count+1;
> 
> else
>     
>     set(hObject, 'enable', 'off') 
> 
> end
> 
> 
> guidata(gcbo, handles);%update
> 
> ------------------
> 
> function next_Callback(hObject, eventdata, handles)
> 
> handles = guidata(gcbo); 
> 
> if(handles.count >= 2)
> 
> set(hObject, 'disable', 'on') 
> 
> else
>     
>     set(hObject, 'disable', 'off') 
> 
> 
> end
> 
> guidata(gcbo, handles);

or is there any better way of doing this?