Let's go back to this alternate approach I offered the other day. I'm
just trying to contrast the differences here and give alternatives or
perhaps lead to some enhanced callback approach. Say we have these routines
install_octave_command ()
corefeval ()
from the other day. At the beginning of the GUI/IDE application after
launching Octave thread, we could do:
install_octave_command ("exit", qt_exit_command);
install_octave_command ("quit", qt_exit_command);
and the GUI now has control over the exit and can determine exactly when
it wants to exit and use a similar if not the exact same exit process
for typing "quit" or "exit" at the command line or pressing the X
button. For example:
qt_exit_command (args)
{
// Make sure files are saved, everything is happy
ignore = some_object->go_through_shutdown_process ();
if (! ignore)
{
corefeval ("exit", varargs, etc.);
qApp->quit ();
}
}
Or something like that.