next up previous index
Next: Passing Goals and Control Up: Embedding into Tcl/Tk Previous: Loading the interface   Index

Initialising the ECLiPSe Subsystem

These are the Tcl commands needed to initialize an embedded ECLiPSe.
ec_set_option option_name option_value

Set the value of an initialisation option for ECLiPSe. This must be done before invoking ec_init. The available option_names are: localsize, globalsize, privatesize, sharedsize, default_module, eclipsedir, io. See Chapter A for their meaning.

ec_init

Initialise the ECLiPSe engine. This is required before any other commands of this interface (except ec_set_option) can be used.
Example Tcl code for initialising ECLiPSe:
lappend auto_path "/location/of/my/eclipse/lib_tcl"
package require eclipse
#ec_set_option io 0;    # input/output/error via tty (for testing)
ec_set_option io 2;     # input/output/error via queues (default)
ec_init

Apart from the basic functionality in package eclipse which takes care of linking Tcl to ECLiPSe, there is a package eclipse_tools containing Tk interfaces to ECLiPSe facilities like debugging and development support. This package should be used when developing Tcl/Tk/ECLiPSe applications. To add these tools to your application, load the package and add the tools menu to your application's menu bar. Your code should then follow contain the following pattern:

package require eclipse
package require eclipse_tools
...
menu .mbar
...
ec_init
...
ec_tools_init .mbar.tools
See also the examples in the lib_tcl directory of the ECLiPSe installation.


next up previous index
Next: Passing Goals and Control Up: Embedding into Tcl/Tk Previous: Loading the interface   Index

1999-08-06