From octave-graphics-request at bevo dot che dot wisc dot edu Mon Nov 11 12:36:25 1996 Subject: Re: GUI interface for Octave From: "John W. Eaton" To: octave-graphics at bevo dot che dot wisc dot edu Date: Mon, 11 Nov 1996 12:36:16 -0600 On 28-Oct-1996, Carl Leitner wrote: : 1) The idea is to make the tcl a text function, and when it is called the : first time, it will initialize the tcl/tk interpreter. In order to allow, : as full as possible access to tcl/tk, >From my perspective, the problem with this is that it will encourage people to write GUI stuff for Octave directly in Tcl/Tk commands. Then when Tcl/Tk is no longer the best GUI toolkit for the job, it will be almost impossible to switch. Not only will there be Tcl/Tk commands in the glue that Octave uses for communicating with the toolkit, but there will likely be a large amount of user code that would have to be changed too. I think it is important to make Octave's user-level code (or even very much of the internals) independent of any given toolkit. I think this can be managed by writing an appropriate set of C++ classes, similar to the way things are done for the new user-defined type system. After spending a little time looking at Tcl/Tk and thinking about how to integrate it with Octave (and leave open the possibility of using other toolkits in the future) I was left wondering about the best way to handle events. I suspect that it will be best for Octave to include everything necessary to collect and respond to events. I doubt that a simple call to TkMain will work, but maybe the situation is not as bad as I think, because Octave's parser only has to respond to complete input lines that are returned from readline, and not individual keystrokes. Do you have any experience working with the event mechanism of Tcl/Tk? jwe