parogers / pgu

Automatically exported from code.google.com/p/pgu
GNU Lesser General Public License v2.1
86 stars 36 forks source link

Two fixes: TextArea.resize() causes widget to grow; TextArea.event() not "using" events #24

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
***
*** Note: Fixed module file attached.
***

What steps will reproduce the problem?
1. Make a gui with a TextArea inside a Table.td().
2. Use the textarea widget a couple times.
3. Watch its width and height grow.

What is the expected output? What do you see instead?
Widget should stay same size. Instead it changes.

What version of the product are you using? On what operating system?
pgu 0.14, pygame 1.9.1, Python 2.6.6, Windows 7.

Please provide any additional information below.
My fix notes:
1. Fixed: gui.TextArea.resize() miscalculated, causing 
gui.Table._Table_td.resize() to grow the textfield each time. Removing 
gui.TextArea.resize() fixed this--possibly with style side-effects, but nothing 
obvious! gui.Input uses the superclass's resize(), so assuming this should also 
be fine for TextArea. Gah... this was hard to debug. :)
2. Fixed: gui.TextArea.event() was not returning True for most keystrokes that 
it handled.

Original issue reported on code.google.com by stabbing...@gmail.com on 28 Jan 2011 at 3:36

Attachments:

GoogleCodeExporter commented 8 years ago
Oops. I accidentally left some debug prints in TextArea.__setattr__. You'll 
want to remove them.

Original comment by stabbing...@gmail.com on 28 Jan 2011 at 4:00

GoogleCodeExporter commented 8 years ago
Excellent, the changes look good. Still not sure exactly what is/was happening 
but the fix seems to work okay. Thanks!

Changes made to repository, another release is forthcoming.

Original comment by peter.ro...@gmail.com on 20 Feb 2011 at 6:50