help-octave
[Top][All Lists]
Advanced

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

Re: Redirecting Octave IO


From: Richard Crozier
Subject: Re: Redirecting Octave IO
Date: Mon, 07 Feb 2011 10:45:33 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1



On 06/02/2011 15:27, Jordi Gutiérrez Hermoso wrote:
2011/2/6 RC Crozier<address@hidden>:
1. select some text in the command window, press the F9 key and have it sent
to octave as a command.
Okay, QtOctave doesn't do this one.

2. select some text in an editor window, press the F9 key and have
it sent to octave as a command.
Did you even try it? QtOctave implements this.

3. have an editor window (with the above ability) with decent syntax
highlighting (I plan to implement this with scintillaNET, a .NET
control that wraps scintilla).
QtOctave does have its own editor with its own syntax highlighting,
but perhaps you consider it indecent.

4. The ability to copy and paste text in the command window using
C-c and C-v, not currently possible in the windows console.
QtOctave does this, in its weird way, because it's making the same
mistake you are making and many other attempts at writing a GUI have
made: sending output via a pipe (i.e. redirecting IO), instead of
hooking onto the readline idle loop. OctaveDE is the only one I know
that gets this right.

5. The ability to step forward etc. when debugging by pressing one
of the F keys
This is kind of implemented but not too well in QtOctave. Debugging is
possible but awkward. And I think you're underestimating how difficult
it is to get it working correctly. You won't have a fun time
implementing this with pipes.

At any rate, I have added your requests to my hg clone of the QtOctave
codebase:

      https://bitbucket.org/jordigh/qtoctave/issues

One further thing, by working with .NET, you are limiting your
contributions to the Windows world, unless you are making sure that
Mono is also able to compile and run your code. It won't be as much
use if release .NET source than if you use a true cross-platform
framework as Qt. I understand that perhaps this is your goal, and
while there is nothing wrong with being selfish, it is much better to
be generous towards other Octave users.

I am going to try one last time to dissuade you from going along this
route. You are repeating mistakes that other GUI authors have already
made; you are tying your work to a particular platform (unless you're
using Mono), you will most likely not reach the goal of creating the
GUI you want, and you will get bored/frustrated before you create what
you want. Instead, please invest the time it takes to understand
someone else's code and improve it. It is a much better long-term
investment if you are serious about giving Octave a good native GUI,
which is one of the most frequent requests from Octave users.

- Jordi G. H.


Ok, well perhaps you have convinced me to desist for the time being at least. Maybe I'll look into helping with qtoctave, I guess it does do nearly what I want and I've now had a browse of the code, which perhaps isn't as difficult as I thought it would be to understand. I would be wanting to do my development in windows though, are there build instructions available for this? I'm not against linux/unix by the way, I work with it every day, but I am most interested in getting it to work in windows where I am usually doing my development work.

There a couple more things I've noticed. First of all, for some reason, automatic indenting in the editor adds huge spaces. My googling makes me think you need to change the TabStopWidth property of the editor which is 80 (pixels) by default to something smaller. 80 pixels is over 2cm, I suggest something more like whatever the width of four characters in the font used. In fact, it might be even better if you simply inserted four space characters rather than a tab character like the matlab editor does, as then the column number shown at the bottom would be more accurate (i.e. is a tab character only one column? that is how it is represented at the minute). I'm assuming this is what is being done around line 184 and 226 of simpleeditor.cpp.

I don't really like the choices of colours and things in the editor for m files, but I see now that this is controlled using an xml file and have changed the preferences to something I prefer, so this is not really a problem.

Another problem for me is that the debugging button on the editor doesn't quite seem to do what I expect, but maybe I just don't now how to do this properly yet.

p.s. perhaps I should no longer be posting this to the octave help? Not sure what the correct etiquette is.

--
Richard Crozier, Research Associate
Institute for Energy Systems
School of Engineering and Electronics
The University of Edinburgh
Faraday Building, Room 4.124
The King’s Buildings
Edinburgh EH9 3JL

Phone: 0131 651 9023
Fax: 0131 650 6554


The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



reply via email to

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