Strange Push Button Issue

7 views (last 30 days)
Kevin Gaukel
Kevin Gaukel on 3 Oct 2014
Edited: Kevin Gaukel on 3 Oct 2014
I have written several pieces of GUI code which all run quite well.
The only issue, and it is mostly a "maddening" issue more than a functional issue, is that I always seem to need to press the push button on my dialog boxes twice before they execute. It doesn't matter if the program is large or small - the button seems to be unresponsive until I press it a second time.
None of my other controls have this issue.
Does anyone have any suggestions? Thank you.
  2 Comments
Geoff Hayes
Geoff Hayes on 3 Oct 2014
Kevin - what are the other types of widgets on your GUI - edit text boxes, uitables, or ..? And by dialog boxes, do you mean actual dialogs outside of your GUI, or just push buttons within the GUI? Have you put breakpoints in the callback for the button to verify that it is only on the second press that it is being called?
A recent question at pushbutton callback function reacts only after second press discussed a similar issue that seemed to occur only when the user pressed the button after editing/selecting a cell in the uitable. I couldn't reproduce the problem (R2014a, OS X 10.8.5) but others could and had seen the problem before.
Kevin Gaukel
Kevin Gaukel on 3 Oct 2014
Edited: Kevin Gaukel on 3 Oct 2014
The GUI I am working on now is relatively simple as it contains an "OK" button
and two tables. Per your previous discussion, I merely update the tables, press OK, and the output of the program is a cell array containing matrices of the two arrays. These are then read into another more complex program which I cannot display because it is company proprietary.

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 3 Oct 2014
I've seen this before when my user is in a uitable, editing it, and clicks the OK button to accept the table as is. For some reason they have to click twice. It seems like all the first click does is to change focus away from the table (take it out of editing mode), and it needs another click to actually do the pushbutton callback. I don't know why. It's been talked about before and I don't recall any workaround. I feel your pain.
  1 Comment
Kevin Gaukel
Kevin Gaukel on 3 Oct 2014
That is pretty much exactly what is happening. Most of my windows edit tables containing plot scales of multiple measurements. When I modify the scale on one cell of the table on my GUI, I have to push the button twice. Thanks for letting me know that I am not crazy. (Or at least not any more crazy than I already am).

Sign in to comment.

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!