To start a Tcl interpreter extended with Tk, the
predicate is called from Prolog. It has the following form:
which returns through the variable TclInterpreter a handle to the
underlying Tcl interpreter. The usual Tcl/Tk window pops up after this
call is made and it is with reference to that window that subsequent
widgets are created. As with the
tcl_new/1 predicate, many
Tcl/Tk interpreters may be created from Prolog at the same time through
The Options part of the call is a list of some (or none) of the following elements:
Please note: This option is not currently supported under Windows.
sendis not covered in this document. Please refer to the Tcl/Tk documentation.)
An example of using
| ?- tk_new([top_level_events, name('My SICStus/Tk App')], Tcl).
which creates a Tcl/Tk interpreter, returns a handle to it in the
Tcl and Tk events are serviced while Prolog is waiting
at the Prolog prompt. The window that pops up will have the title
My SICStus/Tk App.
The reference to a Tcl interpreter returned by a call to
is used in the same way and in the same places as a reference returned
by a call to
tcl_new/1. They are both references to Tcl interpreters.