Creating Graphical User Interfaces Previous page   Next Page

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.

But, 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 the MATLAB state before returning to the original callback.

The following sections provide more information on this topic:


Previous page  Types of Callbacks Controlling Interruptibility Next page

© 1994-2005 The MathWorks, Inc.