User`s guide

Callback Sequencing and Interruption
Note This link executes MATLAB commands and is designed to work within
the M ATLA B Help browser. If you are reading this online or in a PDF, go to
the corresponding section in the M ATLAB Help Browser to use the link.
To see the interplay of the Interruptible and BusyAction properties:
1 Click one of the Wait buttons in the first G UI. Both buttons create and
update a waitbar.
2 While the waitbar is active, click eith er the Surf Plot or the Mesh Plot
buttoninthesecondGUI.TheSurf Plot button creates a
surf plot using
peaks data. The Mesh Plot button creates a mesh plot using the same data.
The following topics describe what happens when you click specific
combinations of buttons:
Click a Wait Button
The Wait buttons are the same except for their Interruptible
properties. Their Callb ack callbacks, which are essentially the same,
call the utility function
create_update_waitbar which calls waitbar
to create and update a waitbar. The Wait (Interruptible) button
Callback callback,wait_interrupt ible , can be interrupted each time
waitbar calls drawnow.TheWait (Noninterrup tible) button Call back
callback,wait_noninterru ptib le, cannot be interrupted (except by specific
callbacks listed in “How the Interruptible Property Works” on page 14-4).
This is the Wait (Interruptible) button
Callback
callback,wait_interrupti ble:
function wait_ inte rruptible(hObject,event data)
% Disable the other push butt on.
set(h_noninterrupt,'Enable','off')
% Clear the axes in the other GUI.
cla(h_axes2,'reset')
% Create and update the waitb ar.
create_update_waitbar
14-9