Effacer les filtres
Effacer les filtres

Strange Push Button Issue

1 vue (au cours des 30 derniers jours)
Kevin Gaukel
Kevin Gaukel le 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 commentaires
Geoff Hayes
Geoff Hayes le 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 le 3 Oct 2014
Modifié(e) : Kevin Gaukel le 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.

Connectez-vous pour commenter.

Réponses (1)

Image Analyst
Image Analyst le 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 commentaire
Kevin Gaukel
Kevin Gaukel le 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).

Connectez-vous pour commenter.

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by