| Issue 206: | Animation stops failure | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1. An error is raised when stopping an complex annimation
What is the expected output? What do you see instead?
the annimation to stop
What version of the product are you using? On what operating system?
pymt 0.4b1, windows xp
Please provide any additional information below.
Tito told me to stop an animation using the widget returned in a
widget.do(anim). wid = widget.do(anim)
It works great, except when the animation is complex, like anim = anim1 +
anim2 + anim3 + ...
The error returned is :
File "C:\eclipse\workspace\touchpy\teste\Main.py", line 23, in touch
self.widget_returned.stop()
AttributeError: 'NoneType' object has no attribute 'stop'
Exception AttributeError: "'NoneType' object has no attribute 'print_exc'"
in <bound method LoaderPygame.__del__ of <pymt.loader.LoaderPygame object
at 0x024BCD30>> ignored
HERE IS AN SIMPLE EXAMPLE
from pymt import *
class Anyclass():
def __init__(self):
self.window = MTWindow()
self.window.push_handlers(on_touch_down=self.touch)
self.widget = MTScatterWidget()
self.window.add_widget(self.widget)
self.animobj1 = Animation(duration=10, pos=[100,100], type = "delta")
self.animobj2 = Animation(duration=10, scale=1.1, type = "delta")
self.animobj = self.animobj1 + self.animobj2
self.animated = False
self.widget_returned = None
def touch(self,touch):
if self.animated == False:
self.animated = True
self.widget_returned = self.widget.do(self.animobj)
else:
self.widget_returned.stop()
self.animou = False
anyclass = Anyclass()
runTouchApp()
Jun 1, 2010
(No comment was entered for this change.)
Labels:
Milestone-0.5
Jun 29, 2010
Fixed, the sequence and parallel animations needs more structuring it seems
Status:
Fixed
Jun 29, 2010
(No comment was entered for this change.)
Status:
Done
|
Owner: sharath.patali
Labels: Milestone-0.4.1