User`s guide

14 Manage Ca llback Executio n
3 KeyPressFcn (uicontrol and uitable callback)
4 KeyReleaseFc n (in f ig ure window only)
5 WindowKeyRel ease Fcn (in figure window or any of its child objects)
How the Interruptible Property Works
YoucansetanobjectsInterruptible property to either on (the default) or
off.
If the
Interruptible property of the object whose callback is executing is on,
the callback can be interrupted. How ever, it is interrupted only when it, or
a function it triggers, calls
drawnow, figure, getf rame , pause,orwaitfor.
Before performing their defined tasks, these functions process any events in
the event queue, including any waiting callbacks. If the executing callback, or
a function it triggers, calls none of these functions, it cannot be interrupted
regardless of the value of its object’s
Interruptible property.
If the
Interruptible property of the object whose callback is e xecuting is off
then the callback cannot b e interrupted, with the following exceptions. If
the i nterrupting callback is a
DeleteFcn or CreateFc n callback o r a figure’s
CloseRequest or Resize Fcn callback, it interrupts an executing callback
regardless of the value of the executing callback object’s
Interruptible
property. These callbacks too can interrupt only when a drawnow, figure,
getframe, pause,orwaitfor function executes.
After the process that interrupts a callback completes, the callback resumes
execution where it halted w hen interrupted.
The callback properties to which
Interruptible can apply depend on the
objects for which the callback properties are defined:
For figures, the
Interruptible property only affects callback routines
defined for:
- ButtonDownFc n
- KeyPressFcn
- KeyReleaseFc n
14-4