Guidata not updating handles
See [EDITED]: I had copied Rightia's code accidently, but Chocolate's code contained the required "handles=".Now I understand what "does not work" was related to.
At the end of the function you can see the call "guidata(h Object, handles);", but when I try to use that at "training_center_Output Fcn" it doesn't exist! This is the code:function varargout = training_center(varargin) % TRAINING_CENTER MATLAB code for training_% TRAINING_CENTER, by itself, creates a new TRAINING_CENTER or raises the existing % singleton*.
I update field A by function myfun1 to the value 20, but I still get 1 in the Command Window! Less so if you have never done any OOP and are not familiar with handle-derived classes, but still can be confusing when people refer to handles to graphic objects also.
I’d appreciate it if you explain it elaborately In many senses 'handles' is a very unfortunate name for this structure.
I build a GUI with a simple idea: there is a button where the user can load a data set and another button where a logic is applyed above that data.
This last logic generate a result that has to be threw out from the GUI, before it closed.
Search for guidata not updating handles:
It is only in the Window Key Press Fcn in which this became a problem.