Hi Roger,
after mapping a dialog window, use gClient->WaitFor(dialog) to wait for the dialog to pop down. For examples see $ROOTSYS/tutorials/gui/guitest.C.
ProcessEvents() just processes any pending events and then returns.
Cheers, Fons.
Roger Mason wrote:
> Hello,
>
> I have a program that pops up a dialog box that will gather user
> input. I'd like execution to stop until the user has supplied that
> input and pressed "OK" on the dialog box.
>
> I thought that gSystem->ProcessEvents() would force that wait, so I
> have the present code snippet:
>
> // Pop up a dialog box and get info about the file.
>
> SimpleDialog(); // pop up the dialog
> gSystem->ProcessEvents(); // should wait for input?
> cout << "File has " << ncols << " columns" << endl;
>
> The output from the cout line shows that the system is not waiting for
> input.
>
> Thanks for any help,
> Roger
>
-- Org: CERN, European Laboratory for Particle Physics. Mail: 1211 Geneve 23, Switzerland E-Mail: Fons.Rademakers_at_cern.ch Phone: +41 22 7679248 WWW: http://fons.rademakers.org Fax: +41 22 7669640Received on Fri Feb 02 2007 - 00:13:07 CET
This archive was generated by hypermail 2.2.0 : Fri Feb 02 2007 - 11:50:01 CET