Ken Prager <email@example.com> wrote in message <bbb01$5273ecf4$423cbefe$7048@EVERESTKC.NET>... > I have a GUI that I created to setup parameters for a simulation. I have > sets of radio buttons or check boxes, in groups, with callbacks for each > group. As an example, one looks like this: > > function uipanel3_SelectionChangeFcn(hObject, eventdata, handles) > str=get(hObject, 'Tag'); > switch str > case 'Err0' > handles.output.Error_Level=0; > case 'Err1' > handles.output.Error_Level=1; > case 'Err2' > handles.output.Error_Level=2; > case 'Err3' > handles.output.Error_Level=3; > case 'Err4' > handles.output.Error_Level=4; > end > guidata(hObject, handles); > > I return the handles.output structure to my main program, which I then > decode to set up my parameters. The problem I am having is that the call > to guidata updates hObject only intermittently. Every time I press a > button I see that the callback is executed (for example, if I follow in > the debugger or put some kind of print statement in the callback) but > updates to handles.output are only returned to my calling script once in > a while. > > Does anyone have any suggestion on what I am doing wrong, or what I can > do to fix this problem. The problem occurs on 2011b under MacOS, 2012b > under Windows, and 2012b under Linux. > > Thanks in advance, > > Ken Prager
Well, I guess the first obvious question is: How do you KNOW that the result of: str=get(hObject, 'Tag'); returns one of the cases you are looking for and not something else like NaN?