Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: handles pass strings
Date: Sat, 7 Nov 2009 20:20:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 13
Message-ID: <hd4kpk$k1h$1@fred.mathworks.com>
References: <hd4es5$jto$1@fred.mathworks.com> <hd4g7a$cjg$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1257625204 20529 172.30.248.37 (7 Nov 2009 20:20:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 7 Nov 2009 20:20:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1966936
Xref: news.mathworks.com comp.soft-sys.matlab:583260


 strcmp(alpha,'A') works but I am not receiving the string from the popup box.  

Check my code:

alpha = uicontrol('Style','popup','String','Beta|Gamma','position',[120,675,40,20],'Callback',(@h_alpha));

function h_alpha(hObject, eventdata, handles)
    alpha = str2double(get(hObject,'String'));
    handles = guidata(hObject);
    guidata(hObject, setfield(handles,'alpha',alpha));


Remember this works for numbers without the popup box!