Re: [Tkinter-discuss] Stumped

2006-11-28 Thread Cam
ginal Message - > From: Sorin Schwimmer > To: tkinter-discuss@python.org > Sent: Tuesday, November 28, 2006 11:42 AM > Subject: Re: [Tkinter-discuss] Stumped > > I never tried Bob's Greschke idea of using update() in a callback, because > of this reason: > > ht

Re: [Tkinter-discuss] Stumped

2006-11-28 Thread Bob Greschke
- Original Message - From: Sorin Schwimmer To: tkinter-discuss@python.org Sent: Tuesday, November 28, 2006 11:42 AM Subject: Re: [Tkinter-discuss] Stumped I never tried Bob's Greschke idea of using update() in a callback, because of this reason: http://www.pythonware.com/li

Re: [Tkinter-discuss] Stumped

2006-11-28 Thread Sorin Schwimmer
I never tried Bob's Greschke idea of using update() in a callback, because of this reason: http://www.pythonware.com/library/tkinter/introduction/x9374-event-processing.htm Sorin __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam pro

Re: [Tkinter-discuss] Stumped

2006-11-28 Thread Bob Greschke
Adding the - lines seems to work. > from Tkinter import * > import time > > def on_button(): > for J in range(10): > print J > if CancelNow: > break > time.sleep(1) -- Root.update() > > def Cancel(Event): -- global CancelNow > print 'Cancel

Re: [Tkinter-discuss] Stumped

2006-11-28 Thread Sorin Schwimmer
Add in your functions, first statement after def global CancelNow This way everybody refers *the same* flag. I would normally move your second-last statement (CancelNow = False) just below imports. De-stumped? Sorin ___

[Tkinter-discuss] Stumped

2006-11-28 Thread Cam
This is probably really simple but I haven't yet figured it out. It happens in the context of a much larger program but stripped to it's essence is per the little program below. The general idea is that the user clicks on a button, that initiates an operation which is going to take some time, s