|
In article <1257782468.922404@irys.nyx.net>,
Francis Burton <fburton@nyx.net> wrote:
>I'd like to make sure all GUI windows are closed when I close
>the main GUI window. Unfortunately, if I call
>
>delete(sub_gui)
>
>when the sub_gui window isn't open, it briefly becomes visible
>before disappearing again. I tried to find a way to tell if it
>is open so that I don't delete it unless it is, but any reference
>to sub_gui, as in ~isempty(sub_gui), causes the flickering effect.
>
>What is the approved way of ensuring that all secondary figures
>are closed when the main window is closed?
I found
delete(0,get(0,'Children'))
and
close all
The latter is preferable for me, because it executes the figures'
CloseRequestFcn, which I use to save the windows' positions on
screen in an .INI file (using Iroln's excellent IniConfig object).
Francis
|