octave-maintainers
[Top][All Lists]
Advanced

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

Re: Yet another GUI releated thought


From: c.
Subject: Re: Yet another GUI releated thought
Date: Thu, 8 May 2008 18:29:00 +0100


On 08/mag/08, at 18:04, address@hidden wrote:

Message: 3
Date: Thu, 08 May 2008 12:15:32 -0400
From: "John W. Eaton" <address@hidden>
Subject: Yet another GUI releated thought
To: S?ren Hauberg <address@hidden>
Cc: Octave Maintainers List <address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain; charset=iso-8859-1

On  7-May-2008, S?ren Hauberg wrote:

|   I'm still not convinced that it is necessary to make Octave thread
| safe or similar complicated things to provide a graphical interface to | Octave. I don't really understand the input handling in Octave, so this
| has been developed in a "Hmmm, I wonder what happens if I press this
| button..." style.
|   What I have done is the following:
| In 'src/input.cc' I have added:
|
|   // TRUE if the GUI is being used
|   bool using_gui = true;
|
| Then later (same file) I have changed the function 'gnu_readline' so it
| reads
|
|   if (!using_gui)
|     retval = command_editor::readline (s, eof);
|   else
|     retval = GUI::readline (s, eof);
|
| This is probably the wrong place to do this, but it seems to work
| (haven't tested much, though). The function 'GUI::readline' returns when
| the user pressed Return in the GUI. The GUI is being started in
| 'octave_main' in 'src/octave.cc' in a separate thread.

If the GUI runs in a separate thread and Octave is not thread safe,
then how do you make the GUI responsive while Octave is off doing some
calculation?

I never took part in the discussions about a GUI because I dont'see much use in it myself... But, just out of curiosity, how much "irresponsive" would the GUI be in this way? If the idea is to reproduce the functionalities of the matlab GUI, if I remeber well, there is not much it can do while the kernel is evaluating a cmmand, it just shows a "busy..." message and dragging or resizing the windows is essantially all that can be done until the evalution is over.

jwe


 c.


reply via email to

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