[Top][All Lists]

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

Re: Questions about quitting Octave and exit confirmation dialog

From: Daniel J Sebald
Subject: Re: Questions about quitting Octave and exit confirmation dialog
Date: Mon, 28 Oct 2019 22:10:01 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 10/28/19 3:38 PM, John W. Eaton wrote:
I'm trying to improve the way Octave behaves when exiting and would like to understand what Matlab users might expect.

Does Matlab offer a "confirm before quitting" option for its GUI?

Not sure, but there could be a confirm quit the first time and then a box "don't ask anymore" to check.

Does that action work when quit is called from a function, or only when it is executed at the command line or when Matlab is closed using some "exit applcation" button in the GUI?

If confirmation is requested when the quit function is called from a function, what does the quit function do?  Here is an example:

   function myquit ()
      disp ('foo-i-hithere');

If you call this function and a quit confirmation dialog is shown and quitting is NOT confirmed, does execution continue immediately after the call to "quit" so that the message displayed?  Or does execution resume at the top-level command prompt with no message displayed?  I'm trying to determine whether the quit function interrupts the execution of a program (similar to Control-C) even if the quit action is not confirmed.

A few years back I worked hard to make all the 'quit' stuff more conventional, but it was kind of tricky. I remember there being a particular snag, but I can't recall what it is. I became busy with other things. But there is a patch at this bug report:


There is a pretty common convention (and Windows might do this automatically) of confirming quit and if the application is busy put up a different type of dialog box like "not responding". So involved in this is to tell the core worker thread to exit. But if the core is busy computing pi to 5 million decimal places, then a timer in the GUI expires and asks if the user wants to end that process. So, then there is properly shutting down a thread to deal with. THEN, if the timer times out and the dialog is visible, say the worker thread finishes its task and responds to the exit, the dialog should go away and the GUI exit. So there needs to be a signal/slot connection from the worker thread to the "shut-down" dialog. Also, there could be multiple exit requests. As I said, it's tricky. It's probably dependent on how Qt signal/slot friendly the overall design is.


reply via email to

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