[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wxOctave???

From: John W. Eaton
Subject: Re: wxOctave???
Date: Thu, 14 Jun 2007 00:57:33 -0400

On 14-Jun-2007, Shai Ayal wrote:

| If you mean an integrated development environment (IDE), have a look
| at octave-workshop
| http://www.math.mcgill.ca/loisel/octave-workshop/
| which has the same aims but is currently unmaintained. Maybe you can take it 

I think the current design of these kinds of tools which attempt to
tack on a GUI to the Octave interpreter in which the GUI handles all
input and then tries to use something like eval() to pass lines to the
interpreter is fundamentally flawed.  For example, to get multi-line
input working correctly, you have to make the GUI input *the* input
method for the parser.  You can't just grab lines and pass them to
eval().  Knowing what constitutes a complete statement requires a
parser, and I don't think it makes sense to write a second parser for
the GUI that tries to decide when a complete statement is available so
that it can be passed to eval.  The Octave parser already knows how to
do this, you just need to hook into it in the appropriate way.

I think the GUI needs to be integrated with Octave so that
the Octave event loop is in control of all GUI events and keyboard
input.  One way to acheive this without too much effort is to use
something like the VteTerminal widget that is an add-on for Gtk.  I
don't know whether something similar exists for WxWidgets, or if
anything like this can even be made to work reliably on a Windows
system.  If not, then I think it will require more work to get it
right, but it should still be possible.  Unfortunately, it may mean
writing (or borrowing) large chunks of code that can emulate a
terminal so that readline can be used.

Some additional thoughts on Octave and GUIs, including some sample
VteTerminal code can be found here:


I think the patch that is mentioned in the comments of the code I
posted has now been accepted into the VteTerminal sources, so it may
no longer be necessary.  See:


and also note that John Swensen was working on a similar project but I
don't think he has posted here in a while.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]