Problems with after_cancel()
Marc
mnations at airmail.net
Tue Jul 23 17:15:05 EDT 2002
**** Post for FREE via your newsreader at post.usenet.com ****
!Sorry if this is a repost. I'm not sure if the original one made it!
I have what I think is a very simple after call and cancel combo:
...
def check():
print "in check"
if globals.stop.isSet():
globals.status.clear()
globals.stop.clear()
print "Application is stopped"
return globals.master.after(100, check)
def function(gui):
gui.print("do something")
id2 = check()
print id2
globals.master.after_cancel(id2)
print "Should be stopped"
...
Check is called to begin the process and returns id2, which should be the id
for the after command. When I print the value of id2, I get something like
"after#25". But when I do the after_cancel command, it doesn't stop. As far
as I can tell, this is the right way to do it, but it's not working.
Could someone please tell me what the problem is?
Thanks,
Marc
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
http://www.usenet.com
Unlimited Download - 19 Seperate Servers - 90,000 groups - Uncensored
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
More information about the Python-list
mailing list