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?

 Accepted Answer

Image Analyst
Image Analyst on 5 Dec 2014
Edited: Image Analyst on 5 Dec 2014
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.

More Answers (0)

Categories

Find more on App Building in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!