[fxruby-users] [Foxgui-users] Stopping a FOX popup window

Jeroen van der Zijp jeroen at fox-toolkit.org
Wed Dec 5 15:09:56 EST 2007

On Wednesday 05 December 2007, Lyle Johnson wrote:
> On 12/5/07, Thomas, Jason M (Software) <jmthomas at ball.com> wrote:
> > That worked great! I'm just curious why I was going down the wrong path.
> > Was it because I called runPopup with a FXMainWindow?
> Yes.
> > Does runPopup only work with a FXPopup?
> Well, it's only meant to work with popups, but since it accepts an
> FXWindow argument, you can (as you discovered) pass in any kind of
> window. runPopup() is one of those methods that I think probably
> shouldn't be public, because it's really sort of a special purpose
> method that FOX only uses internally (as best I can tell). Maybe
> Jeroen will interject with some words of wisdom on this point. ;)

I do think we would be able to change the type from FXWindow to 
FXPopup, to kill any possible confusion about what its supposed to
be used for.

> > When should FXApp.stop be called?
> stop() breaks out of all of the (possibly many) nested event loops, to
> the very top one, which eventually causes your program to fall out of
> the top-level run().

Right!  All the recursive invocations of event loops are added into
a linked list, with the head being the innermost loop.  FXApp::stop()
sets the stop flag on all the loops; FXApp::stopModal(window) stops
all loops up to and including the one associated with the given

It will appear to the application as if all modal dialogs have been

		- Jeroen

More information about the fxruby-users mailing list