how to ignore multiple clicks on buttun in matlab app designer
23 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Kfir Weissman
il 16 Giu 2021
Commentato: Kfir Weissman
il 16 Giu 2021
hi, when i execute my app designer script by 1 click its doing well.
but when i spam the button or just double clicking it, it's execute the callback multiple times or maybe sometimes causing a error for running more that once the callback code.
my question is if there is something to ignore this multiple click on the button and execute the callback function just once.
thanks.
2 Commenti
pcm314
il 16 Giu 2021
Is the user supposed to click that button only once during the entire run time of the app?
If so you can add a line of code to disable the button just after it is pushed, before the rest of the code of the callback:
function PushButtonPushed(app, event)
app.PushButton.enable = 'off'
% Other stuff
end
Then, whenever you want to bring it back to life just set the flag to on.
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!