MATLAB Answers


Multiple UNDO in gui

Nidhi SRIVASTAVA さんによって質問されました 2017 年 7 月 27 日
最新アクティビティ Walter Roberson
さんによって コメントされました 2017 年 7 月 31 日
I am working on guide. I wish to undo the values of the GUI multiple times. I could undo the values one time. Now I am looking for ways to undo it multiple times. If anybody could suggest me something, it will be really helpful. Thank you

  0 件のコメント

サインイン to comment.


1 件の回答

回答者: Shruti Shivaramakrishnan 2017 年 7 月 31 日

You could store the values that are being modified in a structure and "undo" them by removing it from the structure. This new updated value could be the previous value being displayed.

  1 件のコメント

Walter Roberson
2017 年 7 月 31 日
I was thinking of ways to track the changes one by one, find the previous version of the value, restore that. But now I realize that probably far easier would be to have a struct array that has all of the values; every time you make a change, clone the last entry in the struct, make the change there, and add that on the end of the struct. You would use this in conjunction with a routine that took the struct array, extracted the last entry, and set all of the various controls and displays appropriately.

サインイン to comment.

Translated by