Creating Graphical User Interfaces    

Interrupting Executing Callbacks

By default, MATLAB allows an executing callback to be interrupted by subsequently invoked callbacks. For example, suppose you have created a dialog box that displays a progress indicator while loading data. This dialog could have a "Cancel" button that stops the loading operation. The "Cancel" button's callback routine would interrupt the currently executing callback routine.

There are cases where you may not want user actions to interrupt an executing callback. For example, a data analysis tool may need to perform lengthy calculations before updating a graph. An impatient user may inadvertently click the mouse on other components and thereby interrupt the calculations while in progress. This could change MATLAB's state before returning to the original callback.

The following sections provide more information on this topic:


  Types of Callbacks Controlling Interruptibility