How to cleanly stop execution of everything including unknown callbacks?

7 visualizaciones (últimos 30 días)
Ed Callway
Ed Callway el 14 de Mzo. de 2019
Comentada: Rik el 24 de Mzo. de 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 comentario
Rik
Rik el 24 de Mzo. de 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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by