[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 06:16:15 -0400 |
On Apr 11, 2011, at 4:52 AM, Michael Goffioul wrote:
> On Mon, Apr 11, 2011 at 5:19 AM, John Swensen <address@hidden> wrote:
>> 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
>
> This is not portable to Windows. That variable is defined in toplev.h,
> why can't you just include that header?
> Also, why can't you just call octave_main with embedded=false?
>
> Michael.
I think having quit_allowed exposed in toplev.h as an extern is a new thing.
I'm pretty sure it used to be a variable only available in toplev.cc. The
reason we need to have it run in embedded mode is to prevent
clean_up_and_exit() from being called when the main_loop finishes. For various
reasons, mostly associated with interacting with Octave through the (now
called) OctaveLink class, the UI should control when Octave is cleaned up.
That is why I said that it would be preferable to have the third parameter to
octave_main be an enum indicating the mode of operation and act accordingly,
rather than just embedded or not embedded.
John Swensen
- Re: Successfully merged projects, (continued)
- Re: Successfully merged projects, John W. Eaton, 2011/04/11
- Re: Successfully merged projects, John W. Eaton, 2011/04/11
- Message not available
- Fwd: Successfully merged projects, Jacob Dawid, 2011/04/11
- CMake [was:Re: Successfully merged projects], Søren Hauberg, 2011/04/11
- Re: CMake [was:Re: Successfully merged projects], Jordi Gutiérrez Hermoso, 2011/04/11
- Re: CMake [was:Re: Successfully merged projects], Søren Hauberg, 2011/04/11
- Re: Successfully merged projects, Michael Goffioul, 2011/04/11
- Re: Successfully merged projects,
John Swensen <=
- Re: Successfully merged projects, Jacob Dawid, 2011/04/11
- Re: Successfully merged projects, Michael Goffioul, 2011/04/11
- Re: Successfully merged projects, Jacob Dawid, 2011/04/11
- Re: Successfully merged projects, Jacob Dawid, 2011/04/11
- Message not available
- Re: Successfully merged projects, Jacob Dawid, 2011/04/11
- Re: Successfully merged projects, Michael Goffioul, 2011/04/11
- Re: Successfully merged projects, John Swensen, 2011/04/11
- Re: Successfully merged projects, Jacob Dawid, 2011/04/11
- Re: Successfully merged projects, John Swensen, 2011/04/11