This class is used to evaluate a set of Tcl commands in a separate process, so that it can be interrupted. Using the bg_eval method, you specify a command to evaluate in the background. When it is done, a callback method is called with the status and the results of the command. No exec is done, so the process is just a copy of the current one and has a copy of the memory and open files. This class is often used together with the ProgressBar(n) class, to do some processing in the background and allow the user to interrupt it.
This class does not have any visible window, although it does define a frame, which is used to make sure the object is automatically deleted when the class using it is deleted.
The following example evaluates the Tcl command get_preview in a separate process and calls preview_done with the results:
Batch $w_.batch \ -command [code $this preview_done] \ -debug $itk_option(-debug) $w_.batch bg_eval [code $this get_preview]
Please send questions or comments to abrighto@eso.org.
Copyright © 1998 ESO - European Southern Observatory