MATLAB Functions Help Desk

uiresume, uiwait

Purpose

Control program execution

Syntax

Description

The uiwait and uiresume functions block and resume MATLAB program execution.

uiwait blocks execution until uiresume is called or the current Figure is deleted. This syntax is the same as uiwait(gcf).

uiwait(h) blocks execution until uiresume is called or the Figure h is deleted.

uiresume(h) resumes the M-file execution that uiwait suspended.

Remarks

When creating a dialog, you should have a uicontrol with a callback that calls uiresume or a callback that destroys the dialog box. These are the only methods that resume program execution after the uiwait function blocks execution.

uiwait is a convenient way to use the waitfor command. You typically use it in conjunction with a dialog box. It provides a way to block the execution of the M-file that created the dialog, until the user responds to the dialog box. When used in conjunction with a modal dialog, uiwait/uiresume can block the execution of the MFile and restrict user interaction to the dialog only.

See Also

uicontrol, uimenu, waitfor, figure, dialog



[ Previous | Help Desk | Next ]