Python Forum
Trouble with .after() Tkinter
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trouble with .after() Tkinter
#6
(Mar-02-2019, 09:46 PM)woooee Wrote: This code will always ask the same question, i.e. the last question found, so it appears that it is not working because it puts up the same question. Add a print statement to the function to prove this to yourself.
 for question in questions: if question.difficulty == newDifficulty: newQuestion = question 

I got it to work omg!! I put a print statement after
screen1.after_cancel(after_id)

The timer was being cancelled as soon as the button was created. Now the .after_cancel() is at the start of nextQuestion. Thanks for the help :D
Reply


Messages In This Thread
Trouble with .after() Tkinter - by purpleicetwice - Mar-02-2019, 03:14 PM
RE: Trouble with .after() Tkinter - by Larz60+ - Mar-02-2019, 04:57 PM
RE: Trouble with .after() Tkinter - by woooee - Mar-02-2019, 06:06 PM
RE: Trouble with .after() Tkinter - by woooee - Mar-02-2019, 09:46 PM
RE: Trouble with .after() Tkinter - by purpleicetwice - Mar-02-2019, 10:07 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020