Which statements are true?
5 views (last 30 days)
Show older comments
Which statements are true?
Changing a tag of a component automatically updates the callback function of the component.
Changing a string of a component automatically updates the callback function of the component.
The user of a GUI does not see the tag names.
Changing a tag name might require modifications to the code.
0 Comments
Answers (1)
Image Analyst
on 3 Mar 2015
The first two are false - not automatic because you have to save the file in order to take effect.
The third one is true.
The fourth/last one might be true but usually you don't have to change the code thought GUIDE will change the code when you save. There are some circumstances where you do like when the tag name is in a string.
3 Comments
Image Analyst
on 3 Mar 2015
Ray, the first one is definitely, DEFINITELY NOT true. Just try it and see. Bring up a gui and place a button on it. It will call it pushbutton1. View the callback in an editor window in MATLAB. Then with GUIDE in the foreground and the editor visible in the backgrouns, in GUIDE, double click the pushbutton to bring up the property inspector and change the tag to btn1 or something and hit return. Look at the editor window behind GUIDE. See how when you hit return, the callback function name DID NOT change? So, it's like I said - not automatic.
Now, save the new fig file in GUIDE by clicking the disk icon. NOW look at the callback. It's changed. So it's exactly as I said - you have to save the file for it to take effect - it's not automatic. You can also view the callback after you've changed the tag and that will change the function name and save the file. So, like I said, there is definitely a second step you need to manually do before the callback function name gets changed. It's not automatic, unless you have a different definition of automatic than me.
And what do you mean by "I lost my chance"?
See Also
Categories
Find more on Migrate GUIDE Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!