"Krsto Sbutega" <firstname.lastname@example.org> wrote in message news:email@example.com... > Hello everyone, > I am having some problems with the creation of a GUI. I am relatively new > to GUI so I am having a problem that I cannot figure out. Here it is. > I created a GUI in which you input some parameters and when you press next > it stores them and moves to the next window. It all worked fine when I had > it in my script, but now I am trying to make my code modular and I want to > have the GUI as a separate function. However, when I move it to a > function, I get an error because my handle numbers for some reason are not > passed to the callback function when the user presses next. I am not sure > what the issue is and I don't know how to resolve it. A little sample code > is given here:
Walter already answered this over on MATLAB Answers:
but I'd like to chime in with one point. While specifying callbacks as strings is _allowed_ (for backwards compatibility with pre-function handle releases, I believe) I encourage you NOT to specify them as strings unless the callback is something extremely simple, like a DISP statement. Specify them as a function handle (which could be an anonymous function) instead.