How to cleanly stop execution of everything including unknown callbacks?

6 ビュー (過去 30 日間)
Ed Callway
Ed Callway 2019 年 3 月 14 日
コメント済み: Rik 2019 年 3 月 24 日
Now that I have more complicated programs with Guide GUIs that are called by scripts, and serial port callbacks, stopping all execution cleanly is hard.
I've tried combos of delete(timerfind), clear all, delete(hObject), break, exit, fclose, delete, and a few others, but they all leave a mess. In addition, they require that every CloseRequestFcn in every GUI know what every other script has started and add a line just to close that thing = messy code.
Goal: If I close a GUI with the X in the upper right, I need a line or two to put in CloseRequestFcn that just stops EVERYTHING MatLab is doing, removes all running callbacks, and returns to the editor - hopefully without the slightly confusing "do I want to close MatLab" box. Thanx in advance.
  1 件のコメント
Rik
Rik 2019 年 3 月 24 日
This might only be possible by running your GUI in a separate proces and killing the proces when closing the window. The point of a clean exit is to not interupt calls that are not designed to be interupted, which is exactly what you want to do.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by