[mercury-users] extending mercury-tcltk... (PLEASE READ THIS INSTEAD...)

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Nov 27 13:46:42 AEDT 2006

On Sat, 25 Nov 2006, [ISO-8859-15] Jörg Roman Rudnick wrote:

> lately, I have been transcribing examples of Ousterhout / Welch to Mercury. 
> For that sake, I am extending mercury_tcltk wherever I need to, as it is 
> quite easy.
> In consequence, I have growing functionality which might be interesting to 
> others, too.
> The problem is that I found it helpful to split mtk.m into submodules, e.g. 
> tk.core, tk.canvas, tk.conf...

It would have been done like that in the first place except for the fact
that sub-modules didn't exist when the Tcl/Tk binding was originally

> So the following questions do arise:
> 1) Would you still be interested in these extensions?

Certainly, please post them to the mercury-developers list.

> 2) Would you like to specify proposals how to split mtk.m?

Not particularly.  We would be happy to comment on proposed
decompositions if you post them here.

> 3) There were some comments you made in the code:
> a. At mtk.m:604 you write a following comment:
> "% XXX hack until we can implement cget."
> Does this mean you want a
> :-pred cget(tcl_interp, widget, config, config, io.state, io.state).
> :-mode cget_string(in, in, in, out, di, uo) is det.
> or even a "cget(tcl_interp, widget, config, io.state, io.state)" ??

I would guess that the former is wanted, although it's a little
difficult to discern the intention of that comment given that 
(a) it was written nearly 10 years ago by (b) someone who no longer
works with the Mercury group.

> b. In graphics/README you write:
> "We haven't worked out how to prevent the Tcl/Tk library from giving a
> tcl prompt when it enters the event loop. If you know how, let us know!"
> I have made my mercury_tcltk run without the prompt; may I modify this?


> 4) Would you be interested in additional mercury_tcltk code samples?


> 5) Shall these code contributions have test code and to which extent?

If you wish to provide some.


More information about the users mailing list