[fxruby-users] Closing a modal FXDialogBox correctly?

Jeroen van der Zijp jeroen at fox-toolkit.org
Wed Jan 31 12:49:53 EST 2007

On Wednesday 31 January 2007 11:11, Philippe Lang wrote:
> Hi,
> Very rarely, I have a bug when closing a modal dialog box.
> What is the 100% correct way of closing a modal dialog box,
> programmatically, from within the dialog code itself?

To close the dialog, the ID_ACCEPT or ID_CANCEL message is
used, which (1) breaks out of the modal loop and (2) hides the

Implied herein is that you've started the modal loop via the
dialog's execute() function [or with runModalFor()].

The modal event loop is a re-incarnation of the event loop which
won't return to the caller until the stopModal() function is

Note that the window argument in runModalFor() and stopModal()
must match up; perhaps that is the problem?

At any rate, a modal loop is required.  

Hope this helps,

			- Jeroen


More information about the fxruby-users mailing list