Path: news.mathworks.com!not-for-mail
From: "ching l" <chinglnc@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: pass value to the next function
Date: Mon, 20 Jul 2009 22:15:20 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 43
Message-ID: <h42q9o$otn$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 1248128120 25527 172.30.248.37 (20 Jul 2009 22:15:20 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 20 Jul 2009 22:15:20 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1438759
Xref: news.mathworks.com comp.soft-sys.matlab:556954


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);