tomwalters@0: % method of class @parameter tomwalters@0: % bleeck@3: % (c) 2011, University of Southampton bleeck@3: % Maintained by Stefan Bleeck (bleeck@gmail.com) bleeck@3: % download of current version is on the soundsoftware site: bleeck@3: % http://code.soundsoftware.ac.uk/projects/aimmat bleeck@3: % documentation and everything is on http://www.acousticscale.org tomwalters@0: function str=getradiobutton(param,panel) tomwalters@0: tomwalters@0: tomwalters@0: cont=param.entries; tomwalters@0: nrent=length(cont); tomwalters@0: tomwalters@0: tomwalters@0: for i=1:nrent tomwalters@0: type=cont{i}.type; tomwalters@0: if strcmp(type,'radiobutton') tomwalters@0: if strcmp(cont{i}.panel,panel) tomwalters@0: handleb=gethandle(param,cont{i}.text,cont{i}.panel,1); tomwalters@0: if ~isequal(handleb,0) && ishandle(handleb) % yes, there is a screen representation tomwalters@0: val=get(handleb,'value'); tomwalters@0: if val==1 tomwalters@0: text=cont{i}.text; tomwalters@0: panel=cont{i}.panel; tomwalters@0: if strcmp(text,'other...') tomwalters@0: handle2=gethandle(param,text,panel,2); tomwalters@0: str=get(handle2,'string'); tomwalters@0: else tomwalters@0: str=text; tomwalters@0: end tomwalters@0: return tomwalters@0: end tomwalters@0: else tomwalters@0: if cont{i}.value==1 tomwalters@0: str=cont{i}.text; tomwalters@0: if strcmp(str,'other...') tomwalters@0: str=cont{i}.userdata; tomwalters@0: end tomwalters@0: return tomwalters@0: end tomwalters@0: end tomwalters@0: end tomwalters@0: end tomwalters@0: end tomwalters@0: tomwalters@0: tomwalters@0: tomwalters@0: % if still here then non identical fit tomwalters@0: % search for fragment tomwalters@0: tomwalters@0: for i=1:nrent tomwalters@0: type=cont{i}.type; tomwalters@0: if strcmp(type,'radiobutton') tomwalters@0: if ~isempty(strfind(cont{i}.panel,panel)) tomwalters@0: handleb=gethandle(param,cont{i}.text,cont{i}.panel,1); tomwalters@0: if ishandle(handleb) % yes, there is a screen representation tomwalters@0: val=get(handleb,'value'); tomwalters@0: if val==1 tomwalters@0: text=cont{i}.text; tomwalters@0: panel=cont{i}.panel; tomwalters@0: if strcmp(text,'other...') tomwalters@0: handle2=gethandle(param,text,panel,2); tomwalters@0: str=get(handle2,'string'); tomwalters@0: else tomwalters@0: str=text; tomwalters@0: end tomwalters@0: return tomwalters@0: end tomwalters@0: else tomwalters@0: if cont{i}.value==1 tomwalters@0: str=cont{i}.text; tomwalters@0: if strcmp(str,'other...') tomwalters@0: str=cont{i}.userdata; tomwalters@0: end tomwalters@0: return tomwalters@0: end tomwalters@0: end tomwalters@0: end tomwalters@0: end tomwalters@0: end tomwalters@0: tomwalters@0: str='error, the entry does not exist';