How to cleanly stop execution of everything including unknown callbacks?

4 Ansichten (letzte 30 Tage)
Ed Callway
Ed Callway am 14 Mär. 2019
Kommentiert: Rik am 24 Mär. 2019
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 Kommentar
Rik
Rik am 24 Mär. 2019
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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by