octave-maintainers
[Top][All Lists]
Advanced

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

Re: Successfully merged projects


From: John Swensen
Subject: Re: Successfully merged projects
Date: Mon, 11 Apr 2011 00:19:44 -0400

On Apr 10, 2011, at 6:42 PM, John Swensen wrote:

> 
> On Apr 9, 2011, at 5:49 PM, Michael Goffioul wrote:
> 
>> On Sat, Apr 9, 2011 at 9:32 AM, Jacob Dawid <address@hidden> wrote:
>>> Hello everybody,
>>> 
>>> today I finished merging both John Swensens and my work together. I update
>>> my sources for qtermwidget from John and integrated his code in my terminal
>>> window. Additional changes have to be made to open more than one terminal at
>>> the same time, since the terminal still relies on globally defined C-style
>>> functions and opening more than one terminal causes a mess, so there needs
>>> to be some work done here. I attached a screenshot of the terminal, with a
>>> history list being updated from octave directly via John's code.
>> 
>> To be honest, I don't think you need to support multiple octave session, and 
>> I
>> don't think this is technically do-able when running octave sessions in 
>> threads,
>> as opposed to running them in separate processes (octave is not thread-safe
>> and stdin/stdout are not thread-specific).
>> 
>> Michael.
> 
> I guess I kindof agree.  I think having an MDI interface, particularly with 
> multiple instances of Octave running, will be confusing to new users who 
> expect it to be similar in kind to the Matlab interface.  Of all the students 
> and researchers I know who use Matlab and Octave, I can only think of one or 
> two instances where they ran simultaneous Matlab processes and this was on 
> some simulations that couldn't be parallelized easily and they wanted to run 
> 16 simulations simultaneous on a 16 processor machine.
> 
> I actually am a fan of the dock interface, as it is flexible enough to allow 
> the user to arrange the UI however they like.  I do see a lot of variability 
> in how users arrange their Matlab UI.  Some like the help browser docked, 
> some like it floating.  Some like to have a certain plot number docked and 
> the rest floating.  Some like to hide history or the file browser.  I suppose 
> it is possible to do many of the same things with the MDI interface and save 
> the configuration for subsequent loads.  The QT dock interface allows you to 
> do this by saving the geometry and state of the main window widget.  Does it 
> work the same for the QT MDI interface.  You had mentioned that you have to 
> deal with the QT dock center widget carefully.  Can you elaborate?
> 
> John


I see that you cut out the MDI interface.  In the meantime, I was working on a 
simple file browser dockable panel.  If you want to pull the updated 
FileChooserWidget.h and FileChooserWidget.cpp into your source tree, then I can 
start working off you GitHub project exclusively (now I have to learn git, 
despite my best efforts to avoid it ;)).  Here are a few other things that I 
think we will want to do:
1) In the MainWindow::establishOctaveLink (by the way, I think your change to 
the OctaveLink class name is much more descriptive and apropos than 
octave_server), you want to put a small sleep between the calls to 
pthread_create and the command_editor::add_event_hook.  On OSX it was crashing 
because Octave hadn't been initialized by the time add_event_hook was called.  
Maybe there is a variable in Octave that gets set when initialization is 
complete and we can wait for that to be set, rather than an arbitrary sleep 
time that could fail under heavy system load conditions.
2) I think you want to add the definition of an extern for the quit_allowed 
boolean and set it to true somewhere after octave_main has been called.  There 
is some weirdness about how we need to start octave_main in embedded mode, 
switch to buffer, then run the octave main_loop manually.  As a result of 
things that happen inside octave_main when the embedded flag is set to one, we 
have to trick Octave into allowing us to call exit from the command line in the 
GUI.  A better solution would be to propose a patch to Octave that allows the 
third parameter of octave_main to specify NORMAL, EMBEDDED, and IDE modes and 
set things up appropriately.
extern bool quit_allowed;
quit_allowed = true; // Called after octave_main
3) Of course I am partial to the name OctaveDE ;), but am more than willing to 
give up on that to have two people working on an Octave IDE.  Was there any 
sort of meaning behind Quint?  I guess I like OctaveDE because it still has the 
name Octave in it and DE stands for "Development Environment".  I guess in the 
long run if this ever gets incorporated back into the main Octave source tree 
then the command line will have flags for starting in UI or terminal mode.

I have a few other questions about QT in general:
1) Is there a way to make the dock widgets "re-dockable" after they have been 
detached.  I haven't been able to figure out how to do that.  My solution was 
to disable floating, but that isn't the right approach.
2) I'm hoping that the QT dock interface allows dock widgets to dock to two 
different windows.  This will be desirable for both the eventual plot windows 
and editor widget.  Most people I know who use Matlab vary in how they have the 
editors and plots docked.

You have no idea how excited I am that there will another person working on 
this now (not to mention someone who know what the heck they are doing in QT 
and seems to be quite motivated).  Hopefully it will get me reenergized to work 
on this.

John Swensen

reply via email to

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