Prompt in Tk interface

Bas de Bakker basde.bakker at
Wed Nov 5 20:29:45 AEDT 1997

In extras/graphics/README there's a question about avoiding the tcl
prompt.  It seems to me you can do this by calling Tk_MainLoop (the
"real" main Tk routine) directly, instead of calling Tk_Main, which as
I understand it is more of an example main routine.

This means you'd have to do some more initialization yourself, but
this could easily be done by copying Tk_Main from the Tk sources and
removing the unnecessary stuff (like creating the prompt and handling

At the same time you could consider removing the callback mechanism
(which seems mainly there to allow the client code to use the
interpreter created by Tk_Main) and creating something like
mtcltk__create_interp(tcl_interp::out) to create an interpreter and
then after the client code creates commands, windows and such it can
call a mtcltk__mainloop predicate.

Bas de Bakker.

P.S. I'm new here, is this appropriate for this list, or should I have
sent it to the mercury team directly?

More information about the users mailing list