Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

_tkinter.TclError: invalid command name ".!canvas"

def __init__(self):
    ...
    self.sleepTime = 20
    self.isStopped = False
    self.window = window
    self.window.after(self.sleepTime, self.animate)
    window.mainloop()
    ...

def animate(self):
    if not self.isStopped:
        self.canvas.update()
        self.canvas.delete("ball")

        for ball in self.ballList:
            self.redisplayBall(ball)
        self.window.after(self.sleepTime, self.animate)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #invalid #command
ADD COMMENT
Topic
Name
3+1 =