Keep the variable of ediTtext if you don't change it
1 回表示 (過去 30 日間)
古いコメントを表示
Hello, I want to do a GUI that have 4 editText, 1 pushbutton and 1 table. I want to put the info of the editText in the table. When I put the values in the editText and I push the button, it puts in the table. If I don't change anything and I push the button, the gui don't catch the values of the editText. If I change the values all the time I don't have this problem.
- Example: I put the values 4 5 6 7 into the text box
- I hit the button (the values get put into the table)
- I hit the button without changing the values (Here is my problem!)
0 件のコメント
回答 (1 件)
Image Analyst
2017 年 12 月 2 日
What is the code in the callback for the push button? If it extracts the edit text string, and parses it, and puts it into the table, it will work regardless if the text has been changed or not. It simply works on the current string in the edit text box.
2 件のコメント
Image Analyst
2017 年 12 月 2 日
set a breakpoint in that function. Does it step on the same lines of code in the two cases? What are the values of the variables? Just do normal debugging and you should be able to figure it out.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!