User`s guide
5 Compiler Commands
• There are one or more figures y ou want to remain open.
• The function that displays the graphics requires user input before
continuing.
• The function that calls the figures was called from
main() in a console
program.
When
mclWaitForFiguresToDie is called, execution of the calling program is
blocked if a ny figures created by the calling object remain open.
mclWaitForFiguresToDie is u tilized by both .NET Builder and Java Build er
through the use of wrapper methods. See “Blocking Execution of a Console
Application that Creates Figures” in the MATLAB Bui lder for .N E T User’s
Guide and “Blocking Execution of a Console Application that C reates Figures”
in the MATLAB Builder for Java User’s Guide for more details and code
fragment examples.
Note Use caution when calling the mclWaitForFiguresToDie function.
Calling this function from an interactive program like Excel can hang the
application. This fun c tion shou l d be ca ll ed only from console-based program s.
Terminating Figures by Force with the mclKillAllFigures Method
mclKillAllFigures finds all open figures and deletes them. This
function uses the same internal algorithm to locate open figures as
mclWaitForFiguresToDie. The published signature is:
void mclKillAllFigures (HMC RINSTANCE inst)
Typically you use mclKillA llFi gures when:
• Yo u need to kill figures that are being displayed as the result of a
programming problem, such as an endless loop.
• Yo u want to ensure all figures are closed before the execution of another
application.
5-26