473,395 Members | 2,423 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

want to wait until a popup dialog finishes

hi all,

I have a popup dialog using GTK, which allows user to select "Yes" or "No".
Then the program flows depending on the selected answer.
The problem is that func() doesn't not wait for Popup_Dlg()

How can I half the program flow and let it wait until Popup_Dlg() returns a value?
The code is run on Windows, Linux and Solaris


Thanks,
Shawn G

Expand|Select|Wrap|Line Numbers
  1. class A(,...,..)
  2.  
  3. def func(...)
  4.   answ = Popup_Dlg(self, ..,  )
  5.   if answ is True:
  6.     action 1
  7.   else:
  8.     action 2
  9.  
  10. class Popup_Dlg()
  11. ...
Aug 24 '07 #1
1 3045
bartonc
6,596 Expert 4TB
hi all,

I have a popup dialog using GTK, which allows user to select "Yes" or "No".
Then the program flows depending on the selected answer.
The problem is that func() doesn't not wait for Popup_Dlg()

How can I half the program flow and let it wait until Popup_Dlg() returns a value?
The code is run on Windows, Linux and Solaris


Thanks,
Shawn G

Expand|Select|Wrap|Line Numbers
  1. class A(,...,..)
  2.  
  3. def func(...)
  4.   answ = Popup_Dlg(self, ..,  )
  5.   if answ is True:
  6.     action 1
  7.   else:
  8.     action 2
  9.  
  10. class Popup_Dlg()
  11. ...
Not sure about GTK, but in other frameworks (wxPython and Tkinter) it goes like this:
Create the dialog:
Expand|Select|Wrap|Line Numbers
  1. dlg = TheDialogClass(args)
Wait for the dialog to finish by calling its Modal() method:
Expand|Select|Wrap|Line Numbers
  1. answer = dlg.ShowModal()
Hope that helps.
Aug 24 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Kannan | last post by:
Hello, I have a requirement that specifies that I display a "Please Wait..." window (preferably modal) along with a gif that mimics a progress bar during a save operation. The dialog needs to be...
0
by: mrnicelife | last post by:
Hi, When using WebBrowser object to print an html page, the ExecWB call has a nice argument that allows an application to wait for the completion of the print job. When an app call ExecWB with...
14
by: tshad | last post by:
I posted this on the asp.net group, also. I wasn't sure whether this was an asp.net problem or a javascript problem. I have a page that was originally created from a program I found on the net...
4
by: Peter | last post by:
I am using CreateProcessWithLogonW to run an external application, the problem I am having is that the C# program does not wait until the external program finishes running before continuing. The...
1
by: VMI | last post by:
How can I add a small "Please wait..." form to a child form so that when I minimize the child form, the "Please Wait..." form will also disappear? This form will be displayed when the child form is...
7
by: multicherry | last post by:
Hi, Having searched for a way to fetch a window object by name, all I came across were answers along the line of... "All you have to do is say windowObj = window.open("blah", "name");" which...
22
by: Jason Zheng | last post by:
This may be a silly question but is possible for os.wait() to lose track of child processes? I'm running Python 2.4.4 on Linux kernel 2.6.20 (i686), gcc4.1.1, and glibc-2.5. Here's what happened...
2
by: Doug | last post by:
Is there a way to get the VB code that opens a popup to wait until the popup is closed before continuing?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.