My favorites | Sign in
Project Home Downloads Issues
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 221: MTFlippableWidget Bug
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Mar 2010


 
Reported by interact...@gmail.com, Mar 3, 2010
What steps will reproduce the problem?
I have many flappable widgets with an image in front and in back, all the
flips added in the same scatterWidget
when I touch them they flip, but if the last flippable, the most left one
is backside when I flip the first one, the left one looses its image and
gets blank, if I flip its rigth neibor and flip the first one again, it
becomes blank too and so on until all the flippable widgets desapear in the
screen.
if I flip a bland flippable, it only shows the back image every turn.

What is the expected output? What do you see instead?
The first flippable shouldn't change the last flappable

What version of the product are you using? On what operating system?
pymt-0.4-win32-full-py26 on windows xp professional

Please provide any additional information below.
an application is attached, if its my mistake or if it's solved, please
contact me, simbaedu@yahoo.com.br

IT_Flip_Showcase.rar
948 KB   Download
Mar 3, 2010
Project Member #1 txprog
After some playing with your demo, you got a conflict between ScatterImage and
touchs. Don't use ScatterImage if you just want to show an image. You can use
MTContainer() (an abstract container to display anything from Core package) + Image
(from Core package). =>
MTContainer(Image(filename)) = an image widget

So in your code, it would be:
            front_image = MTContainer(Image(
                os.path.join(current_dir, 'front%d.jpg' % i)))
            back_image = MTContainer(Image(
                os.path.join(current_dir, 'back%d.jpg' % i)))


Then, you'll see that it not changing at the good moment. Flippable widget have a
trouble with that if the widget is not centered to the window. For you, i've added
flipangle attribute to FlippableWidget. And with by-hand adjust, i've found this to
work very well :
            
            flip = MTFlippableWidget(size=[204.8, self.height], pos=[204 * i, 0 ],
                                    flipangle=90+40-i*20)



I hope you'll be happy :)

Status: Fixed
Labels: Milestone-0.4.1 Component-Core
Mar 3, 2010
Project Member #2 txprog
(No comment was entered for this change.)
IT_Flip_Showcase.py
2.4 KB   View   Download
Jul 2, 2010
Project Member #3 txprog
(No comment was entered for this change.)
Labels: Milestone-0.5

Powered by Google Project Hosting