Kill button on application

I have a GUI application that includes a Quit button on the GUI. This all works fine with a clean exit when run in the Matlab environment (and also compiled version). But when I use the Kill button in the top right corner the application does not exit cleanly both when run in the Matlab envirnoment and compiled version.
What am I missing?

 Risposta accettata

Image Analyst
Image Analyst il 5 Dic 2014
Modificato: Image Analyst il 5 Dic 2014

0 voti

Are you doing some extra cleaup in your Quit button callback, like stopping timers or whatever? If you click the upper right X it does not do any of that. You can put the cleanup code in the figMainWindow_CloseRequestFcn() function and then it will run that when you click the X.

Più risposte (0)

Categorie

Scopri di più su App Building in Centro assistenza e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by