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

답변 (1개)

Shruti Shivaramakrishnan
Shruti Shivaramakrishnan 2017년 7월 31일

1 개 추천

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
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.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터 및 File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

질문:

2017년 7월 27일

댓글:

2017년 7월 31일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by