How to cleanly stop execution of everything including unknown callbacks?

조회 수: 4 (최근 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 CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by