OK, when I call myinterval.stop(), I get a deprecation error. I can’t see in the API docs which method replaces this.
How do one start and stop intervals without getting the deprecation warnings/errors.
Thanks,
Christian
def EndMove(self):
''' Add the distance traveled to self.traveled and abort the self.moveinterval if necessary
'''
self.traveled += (self.moveinterval.getT()/self.moveinterval.getDuration()) * self.__steptravel
if self.moveinterval.isPlaying():
self.moveinterval.stop()
pause() is the correct way to stop an interval without doing all of the stuff at the end of the interval. finish() is the correct way to stop an inverval and guarantee that the stuff at the end of the interval is done.
Many years ago, we discovered that programmers were confused about whether the final actions of the interval would be done when they called stop(). So we removed stop() and replaced it with finish() and pause(), whose names were chosen to make it perfectly clear whether they perform the remaining actions or not.
It is perfectly acceptable to pause an interval and never resume it.