Giter VIP home page Giter VIP logo

pgu's People

pgu's Issues

Table rowsize calculation is wrong

It looks like it doesn't spread out extra vertical space correctly if the 
height has not been reached. The simplest fix is to remove the "/ 
len(rowsizes)" on table.py:248, but here's a few lines which also clarify 
variables and use floats for better accuracy (I think).

        w, h = sum(columnsizes), sum(rowsizes)
        if w > 0 and w < self.style.width and len(columnsizes):
            extra = self.style.width - w 
            for n in xrange(0, len(columnsizes)):
                percent_width = float(columnsizes[n]) / w
                columnsizes[n] += int(percent_width * extra)
        if h > 0 and h < self.style.height and len(rowsizes):
            extra = self.style.height - h
            for n in xrange(0, len(rowsizes)):
                percent_height = float(rowsizes[n]) / h
                rowsizes[n] += int(percent_height * extra)

Original issue reported on code.google.com by dbenamy on 6 Dec 2010 at 8:37

TextArea: Add "editable" property

The TextArea is currently not very suitable for displaying multiple line text 
that the user is not supposed to edit.  While one can emulate this with labels, 
the developer would have to manually split the string and insert the labels 
correctly (which is a pain).

I have attached a patch to create an "editable" property to the TextArea that 
makes the uneditable, but still enabled.  The difference between "uneditable" 
and "disabled" is that the disabled TextArea will be grayed out (blurred?), 
whereas the "uneditable" will look like an editable TextArea without focus.

Despite being "focusable = False", the TextArea still receives focus.  In my 
patch, I have merely "worked around it" by ignoring focus in those cases.

Thank you for considering.

Original issue reported on code.google.com by [email protected] on 18 Dec 2012 at 9:01

Attachments:

I want to blit GUI button object

I am loading a image using pygame.image.load.Then I'm creating a GUI
button.I want to load this button in the image and perform some action.How
can I do that since screen.blit requires a surface object

Original issue reported on code.google.com by [email protected] on 10 Apr 2010 at 6:04

I've modified text.writewrap

Attached is my modified copy.

writewrap now takes two new arguments max_rows and wrap_on_char. The wrap on 
char support is necessary for languages such as Chinese which wrap by 
character and not word.

Original issue reported on code.google.com by [email protected] on 4 Apr 2010 at 10:13

Attachments:

widget.get_abs_rect is not quite right

Here is a fix that we use instead of the built in widget method. The one built 
into widget wasn't returning quite the right size.



def get_real_abs_rect(widget):
    """Get the absolute position and dimensions of a widget on the screen.                                                                                                          
    (Does what gui.Widget.get_abs_rect() claims to do, but actually does it                                                                                                         
    correctly.)"""

    # HACK: This gets into the PGU GUI implementation details quite a bit.                                                                                                          

    # The code here is copied from get_abs_rect(self) in pgu/gui/widget.py,                                                                                                         
    # without the lines that add self._rect_content.x/y to x/y.  This seems                                                                                                         
    # slightly less likely to break in a future PGU version than simply                                                                                                             
    # subtracting widget._rect_content.x/y from the results of                                                                                                                      
    # Widget.get_abs_rect(), because the bug in get_abs_rect may be fixed in a                                                                                                      
    # future version.                                                                                                                                                               

    x, y = widget.rect.x, widget.rect.y
    c = getattr(widget,'container',None)
    while c:
        x += c.rect.x
        y += c.rect.y
        if hasattr(c,'_rect_content'):
            x += c._rect_content.x
            y += c._rect_content.y
        c = getattr(c,'container',None)
    return pygame.Rect(x, y, widget.rect.w, widget.rect.h)

Original issue reported on code.google.com by [email protected] on 6 Jul 2010 at 10:42

TextArea resize issues

What steps will reproduce the problem?
1. gui.TextArea(width=100, height=100).resize(width=200, height=200)

What is the expected output?  What do you see instead?
I would expect the text area to resize, but it does not.

When using the "ta.rect.w, ta.rect.h = ta.resize()" thing occasionally observed 
in pgu, the widget appears to change size, but the widget is not aware of it 
(not surprised here).

What version of the product are you using? On what operating system?
pgu svn r41.  Debian GNU/Linux Wheezy.  Though the problem is almost certainly 
OS independent as the code for resizing the TextArea is the same as Widget (the 
latter ignores its input parameters).

Please provide any additional information below.
I have attached a small demo script to show the issue.  When clicking on the 
resize button, the widget is supposed to resize to 400x100 (from 150x100).  I 
used the "ta.rect.w, ta.rect.h = ta.resize()" to force the widget to resize.  
This causes the text to become unreadable (see pgu-text-area-resize-b.png).  If 
that line is removed, the widget simply refuses to change its size (remaining 
in the state shown in pgu-text-area-resize-a.png)


Original issue reported on code.google.com by [email protected] on 7 Dec 2012 at 1:46

Attachments:

tries to raise a string as an exception

In gui/surface.py, line 12, an exception is raised. However, python doesn't 
know how to raise an exception that is a string, and complains about it.

I'm using pgu 0.12.3 on ubuntu 10.04.


Original issue reported on code.google.com by [email protected] on 5 Jul 2010 at 7:12

Updating pgu to pygame 1.9?

Sorry. And sorry for not using the pregenerated for for submiting this 
problem, but I guess you know pgu is not compatible with pygame 1.9.

I think that you haven't fixed this because you just don't hae the time or 
interest, but is very important to me. I have never helped in any non-mine 
project, so this is dificult to me but... can you point me in the right 
direction to help me port your pgu to pygame 1.9.x?? Please :)


Original issue reported on code.google.com by faboster on 21 Jan 2010 at 4:12

Mouse wheel support

It would be nice to have mouse wheel support for scrollable areas.
Attached you can find a simple patch for this. At least it works for the
examples (6, 11, 12, 15, 17).

Original issue reported on code.google.com by [email protected] on 13 Apr 2009 at 1:36

Attachments:

gui.textarea.TextArea sets the editor caret at eol - 1

What steps will reproduce the problem?
1. This requires the previous fix to TextArea so it doesn't raise IndexError.
2.
    t = gui.Table()
    t.tr()
    t.td(gui.TextArea(value=''))
3. Focus the text area and type characters to see the bug.

What is the expected output? What do you see instead?
Characters should append to line. Instead they insert at eol - 1.

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.
To fix this change the following line in TextArea.setCursorByHVPos():
##                if ( self.hpos >= len(line) ):
                if ( self.hpos > len(line) ):

Original issue reported on code.google.com by [email protected] on 28 Jan 2011 at 3:35

Collision Detection for 2 sprites with same type of tile

Basically I want to do collision detection of 2 sprites with the same type
of tiles. I tried entering both sprites in the tdata dictionary, but it
only does collision detection for the sprite entered later. Maybe you could
develop a way in which I can do collision detection for 2 sprites with the
same type of tile?


I'm using pgu version 0.12.3, python 2.6 on linux.




Original issue reported on code.google.com by [email protected] on 11 Apr 2010 at 4:58

Button doesn't take unicode label

In Button class first line to __setattr__ should have an or type == unicode 
as below:

if k == 'value' and (type(v) == str or type(v) == unicode)

However I'm not sure the correct way of setting the font for the Button. I 
tried Button(u"some chinese text", font=chinese_font), but that failed to 
change the font the button used to draw its label.


Original issue reported on code.google.com by [email protected] on 4 Apr 2010 at 6:18

Error in basic.py

In the set_font method for the Label class, surely the lines should read
self.font and self.chsize() instead of this.font and this.chsize() as they seem 
to be in the version I downloaded?

Original issue reported on code.google.com by [email protected] on 11 Jan 2012 at 5:15

algo.astar looks beyond layer; causes IndexError

algo.astar() takes a layer object, which is some object such that
layer[y][x] is an integer. During the course of pathfinding, it may look
outside the layer for nodes to go to, causing an IndexError if the
intuitive option of using a sequence of sequences is used. 

The user-end solution to this is to wrap unwalkable nodes around the edge
of the layer so that the algorithm would have no access to non-existent nodes.

I feel that on the implementation side, this behavior should be documented
(it is not intuitive to people that don't know pathfinding that A*, which
would in the end find a straight path from (0,0) to (0, 1), would look at
(-1, 0) or (0, -1) < http://paste.pocoo.org/show/114987/ >), or else that
pgu.algo.astar() should assume that nonexistent places on the layer (which
raise LookupError) are not walkable. The latter solution seems most
appealing to me.

Original issue reported on code.google.com by [email protected] on 29 Apr 2009 at 4:48

Select GUI Statement not working in examples..

What steps will reproduce the problem?
1. example/gui5.py (I tested in example 3 also)
latest version / win32XP

Please provide any additional information below.

Traceback (most recent call last):
  File "Z:\Temp\pgu-0.12.2\examples\gui3.py", line 47, in <module>
    app.run(container)
  File "..\pgu\gui\app.py", line 218, in run
    self.loop()
  File "..\pgu\gui\app.py", line 174, in loop
    us = self.update(s)
  File "..\pgu\gui\app.py", line 203, in update
    us = container.Container.update(self,screen)
  File "..\pgu\gui\container.py", line 44, in update
    us = w.update(surface.subsurface(s,w.rect))
  File "..\pgu\gui\theme.py", line 341, in func
    r = m(surface.subsurface(s,w._rect_content))
  File "..\pgu\gui\container.py", line 44, in update
    us = w.update(surface.subsurface(s,w.rect))
  File "..\pgu\gui\theme.py", line 341, in func
    r = m(surface.subsurface(s,w._rect_content))
  File "..\pgu\gui\container.py", line 36, in update
    sub.blit(w._container_bkgr,(0,0))
AttributeError: Button instance has no attribute '_container_bkgr'
>>> 

Original issue reported on code.google.com by [email protected] on 13 Jul 2009 at 4:27

Error calling isinstance with pygame.Color

What steps will reproduce the problem?

1. Run examples/gui1.py 

Result:

File "../pgu/gui/theme.py", line 483, in paint
if isinstance(v, pygame.Color) or type(v) == tuple:
TypeError: isinstance() arg 2 must be a class, type, or tuple of classes
and types


pgu 0.12.2
pygame 1.7.1
python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
os: [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2


This was easy for me to fix in my local copy just by removing the
isinstance call since Color is just a function that returns a tuple. I
don't know if there are any backwards compatibility issues to be worried
about with that approach but I've attached a patch of those changes anyway.

Original issue reported on code.google.com by [email protected] on 15 Jun 2009 at 3:31

Attachments:

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

***
*** 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 [email protected] on 28 Jan 2011 at 3:36

Attachments:

Please support "partial" functions as callback handlers

What steps will reproduce the problem?
1. Run "partial-callback.py" (attached)

What is the expected output? What do you see instead?
That a dialog box is opened with a title and message of "Title" and "Message" 
(respectively).  Instead this crashes with:

"""
AttributeError: 'functools.partial' object has no attribute 'func_code'
"""

A functools.partial object is callable so it would be nice to be able to use 
them directly as a signal handler.  An alternative is to wrap it in a:
   lambda *args: f(*args)
but I'd prefer not having to do that.


What version of the product are you using? On what operating system?
pgu from svn (r41).  Debian GNU/Linux Wheezy, but I suspect the issue is OS 
independent.


Original issue reported on code.google.com by [email protected] on 7 Dec 2012 at 2:45

Attachments:

pgu won't install in python3 because os.path.walk was removed

Due to the removal of os.path.walk in favor of os.walk the setup.py file won't 
work with the current version of Python3 (Python 3.2). I've attached a patch 
file for setup.py, which replaces os.path.walk with os.path. (And for 
convenience the patched setup.py file) While it produces the same output for me 
like the old setup.py file (used with python 2.7), there was a statement in the 
original checking for .svn, which I didn't included. That's simply because I 
don't know whether it is necessary. But it should be no problem to add it. 
Furthermore I added a cmdclass, so that distutils automatically calls 2to3 on 
every file. 

It builds just fine on my computer, so I hope it is flawless although it 
probably need some adjustments. 

Original issue reported on code.google.com by [email protected] on 22 Jul 2011 at 3:38

Attachments:

submenu area sometimes not showing

What steps will reproduce the problem?
1. start example gui9.py
2. close the welcome dialog
3. lclick the 'file' menu [ file submenu shows ]
4. move the mouse pointer over 'help' menu (without click) [help submenu 
shows]
5. move back again over 'file' [ file submenu dont show. Even clicking 
over 'file' dont show the submenu. But, moving down 'file' the mouse 
pointer, the submenu progresively displays ]

What is the expected output? What do you see instead?
It is expected the file submenu be displayed; it is not

What version of the product are you using? On what operating system?
pgu vs 0.12.2 ( python 2.4 and 2.6 - pygame 1.7.1 and 1.8.1 - win XP)

Please provide any additional information below.
In pgu '0.10.6' the behavoir was correct.

claxo

Original issue reported on code.google.com by [email protected] on 8 Mar 2009 at 5:34

method tile_to_screen(self, pos) form isovid

What steps will reproduce the problem?


def load_image(g,pos):
    x,y=g.tile_to_screen(pos)
    s = isovid.Sprite(g.images['tank'],(x,y))
    g.sprites.append(s)


What is the expected output? What do you see instead?

I think that it should draw a sprite at the tile specified by pos. example 
(10,0)

But the sprite is printed far away, using (10,0) for example prints the sprite 
at tile (5,2)

What version of the product are you using? On what operating system?

pgu-0.18 on Linux

Please provide any additional information below.

The sprite is draw far from the position of the tile set by pos.

Maybe I am understanding the method bad, some help will be appreciated. 

Original issue reported on code.google.com by [email protected] on 12 Mar 2012 at 2:45

Label size problems with changing content

What steps will reproduce the problem?
>>> from pgu import gui
>>> label = gui.Label("mytext",width=300)
>>> label.style.width
55

What is the expected output? What do you see instead?
(expected 300)


What version of the product are you using? On what operating system?
pgu-0.18 on ubuntu

Please provide any additional information below.

The reason that I feel this is needed is that I want to be able to change the 
label value in a fixed size container. Label.set_text was very slow.
(attempting to display the value of a moving slider caused lag)

I created a workaround that allows you to set a number of characters that you 
would like to be able to display, and if it is set, then the label will use 
that number of 'M' characters to estimate the size of the field.

===================================
#new Label.__init__()
    def __init__(self, value="", **params):
        params.setdefault('focusable', False)
        params.setdefault('cls', 'label')
        widget.Widget.__init__(self, **params)
        self.style.check("font")
        self.value = value
        self.font = self.style.font
        params.setdefault('chars')
        self.chars=params['chars']

        if self.chars is None:
            self.style.width, self.style.height = self.font.size(self.value)
        else:
            self.style.width, self.style.height = self.font.size("M" * self.chars)

#new set_text()
    def set_text(self, txt):
        """Set the text of this label."""
        self.value = txt
        # Signal to the application that we need to resize this widget
        if self.chars is None:
            self.chsize()
        else:
            self.repaint()


#new Label.resize()
    def resize(self,width=None,height=None):
        # Calculate the size of the rendered text
        if self.chars is None:
            self.style.width, self.style.height = self.font.size(self.value)
        else:
            (self.style.width, self.style.height) = self.font.size("M" * self.chars)
        return (self.style.width, self.style.height)


==========================================================
#showing differences
>>> from pgu import gui
>>> oldlabel = gui.Label("mytext")
>>> oldlabel.style.width
55
>>> sizelabel = gui.Label("mytext", width=100)
>>> sizelabel.style.width
55
>>> newlabel = gui.Label("mytext", chars=10)
>>> newlabel.style.width
130

Original issue reported on code.google.com by [email protected] on 30 Jul 2013 at 10:30

Minor titlebar glitch in "clean" theme

What steps will reproduce the problem?
(0. Create a black screen ?)
1. Create and open a pgu dialog with "clean" theme (on Linux)
   (might have to be opened on top of the black screen)

What is the expected output? What do you see instead?
Titlebar should be continuous, but I see a minor black "vertical bar".  It 
might have been inherited from the background below the dialog.


What version of the product are you using? On what operating system?
Debian GNU/Linux Wheezy

Please provide any additional information below.
See screen shots of the "clean" vs. the "default" theme.

Original issue reported on code.google.com by [email protected] on 7 Dec 2012 at 10:15

Attachments:

Tutorial for subclassing container needed

I want to create a container that can hold 2 labels side by side and will 
draw its own background color behind those labels. This container would 
change its background color when the mouse is hovering over it.

I cannot figure out how to have a subclassed container draw its own 
background as the code is not commented well enough for me to follow. I also 
don't understand how self.myhover works.

If someone can get me started with this I have a bunch of my own widgets I'd 
add to pgu. 

Original issue reported on code.google.com by [email protected] on 4 Apr 2010 at 10:11

gui.Switch: Draw True, when the boolean is False

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 22 Apr 2011 at 12:01

gui.Form.items() raises AttributeError

What steps will reproduce the problem?
1. Make a gui.App() and a gui.Form().
2. Add some widgets with names: t = Table(name='mypanel').
3. print gui_form.items()

What is the expected output? What do you see instead?
Expected:
    Print the items.
Instead:
  File ".../gummworld2/world_editor.py", line 490, in __init__
    self.make_gui()
  File ".../gummworld2/world_editor.py", line 615, in make_gui
    print self.gui_form.items()
  File ".../gummworld2\gamelib\pgu\gui\form.py", line 71, in items
    return self.results().items()
  File ".../gummworld2\gamelib\pgu\gui\form.py", line 66, in results
    r[e.name] = e.value
AttributeError: Table instance has no attribute 'value'


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.
As a workaround I am doing:

    # Force the form to process _dirty state.
    gui_form['whatever']

    # Directly access.
    gui_form._emap.items()

I have no fix for this. It would take a significant class update. I can try it, 
but you might not like my choices. Looks like the way add() parses the 
arguments, and items() returns the info, the class may be incomplete or 
Container's use of add() is incomplete?

Original issue reported on code.google.com by [email protected] on 28 Jan 2011 at 3:54

No spanish specific characters in textarea

Hi
I am using pgu 0.12.3 in an OLPC (sugar> debian based) machine.
The textarea works fine in general, but when I press ñ, á, é, or the other 
vowels(very important in spanish), I get nothing on screen and an error (key 
ntilde unrecognized, dead_acute unrecognized, and so on).
Any ideas?
Thanks in advance

Original issue reported on code.google.com by [email protected] on 15 Dec 2010 at 12:48

bad clearing of submenu area after collapsing (pgu 0.12.2)

What steps will reproduce the problem?
1. start example gui9.py
2. close the welcome dialog
3. lclick the 'file' menu [ file submenu shows ]
4. lclick the painter area [ the toolbar buttons are redrawn without 
clearing the 'file' submenu area, up and down the toolbar you see 
dirtiness ]

What is the expected output? What do you see instead?
Expected that the submenu will completelly hide, but some background area 
is not cleared

What version of the product are you using? On what operating system?
pgu vs 0.12.2 ( python 2.4 and 2.6 - pygame 1.7.1 and 1.8.1 - win XP)

Please provide any additional information below.
In pgu '0.10.6' the behavoir was correct.



Original issue reported on code.google.com by [email protected] on 8 Mar 2009 at 5:38

Creating a menu unconditionally writes to stdout

What steps will reproduce the problem?
1. Create a menu bar via gui.Menus

What is the expected output?
Nothing written to stdout.

What do you see instead?
Current it prints a tuple of each menu item, like:

('add', 'Load campaign', <function theme_open at [...]>, None)
('add', 'Load level', <function theme_open at [...]>, None)
('add', 'Quit', <bound method Application.quit of [...]>, None)
('add', 'Tutorial', <bound method Application.open_tutorial of [...]>, None)

What version of the product are you using? On what operating system?
pgu-0.18 on Debian GNU/Linux Wheezy.


Patches:
I have provided two patches for handling this.  I suggest either guarding the 
print statement somehow (my patch uses the "PGU_DEBUG" env variable) or simply 
removing the print statement.


Original issue reported on code.google.com by [email protected] on 7 Dec 2012 at 10:27

Attachments:

RETURN key signal

Hi.

I wonder if there is a signal which can be catched when the user press the 
RETURN key on an Input widget.

Regards. BIAGINI Nathan.

Original issue reported on code.google.com by [email protected] on 9 May 2011 at 2:31

"clean" theme crashes: StyleError 'font' for 'dialog.title.label'

What steps will reproduce the problem?
1. Run "test.py" (attached) with PGU_THEME="clean" style

What is the expected output? What do you see instead?
The program crashes with:
""" 
pgu.gui.errors.StyleError: Cannot find the style attribute 'font' for 
'dialog.title.label'
"""

With the "default" theme, the program starts just fine.

What version of the product are you using? On what operating system?
pgu from svn r41.  Debian GNU/Linux Wheezy, but I suspect the issue is OS 
independent.

Original issue reported on code.google.com by [email protected] on 7 Dec 2012 at 2:17

Attachments:

gui.textarea.TextArea blows up when value=""

What steps will reproduce the problem?
1.
    t = gui.Table()
    t.tr(gui.TextArea(value=''))
2. Click in text area. Get IndexError somewhere in setCursorByXY() or 
setCursorByHVPos(). Can't remember exactly where, but I'm including the trivial 
fix for you at the end of this. :)

What is the expected output? What do you see instead?
Should focus the textarea and allow typing. Instead it raises IndexError.

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.
In file pgu/gui/textarea.py, TextArea.doLines() make the following addition:
            # If we reached the end of our text
            if (inx < 0):
                # Then make sure we added the last of the line
                if (line_start < len( self.value ) ):
                    self.lines.append( self.value[ line_start : len( self.value ) ] )
                ## ADD: next 2 lines
                else:
                    self.lines.append('')

Original issue reported on code.google.com by [email protected] on 28 Jan 2011 at 3:31

container.py not python3 compatible

What steps will reproduce the problem?
1. Install python3
2. Install pygame for python3
3. Run PGU program with python3


What is the expected output? What do you see instead?
Instead of running normally system crashes with error on line 57 of container.py

What version of the product are you using? On what operating system?
PGU 0.18

Please provide any additional information below.
Checking code I discovered that line 57 used python2 usage not compatible with 
python3. I have corrected the line in question so it will work with both 
python3 as well as python2 and attached it to this issue. A quick review of the 
source code found no similar errors.


Original issue reported on code.google.com by Donkyhotae on 13 Jan 2015 at 9:16

Attachments:

use gui.Button to load a new page

I have a gui button.When a button click happens I want to load a new python
script which should blit the current page.How can I do this

Original issue reported on code.google.com by [email protected] on 11 Apr 2010 at 10:08

Suggestions for improving FileDialog (filtering)

It would be nice if the FileDialog could provide a simple filtering mechanism.  
I have attached two patches to do this.

The first patch provides a very simple and crude filter mechanism (simply set 
path_filter to a function that returns a bool - True => file/dir is shown, 
False => it is hidden).

The second patch extends this to provide an file-extension filter by accepting 
a simple list as argument for the constructor.  Example being:

        ext_f = [
           ("Images", ("jpg", "jpeg", "png")),
           ("Audio", ("mp3", "wav")),
           ("Text files", "txt"),
           ]
        dialog = FileDialog(value="path/to/resources", ext_filter=ext_f)

The user can then choose the relevant filter from a "drop-down" box (a Select 
in pgu terms).


Original issue reported on code.google.com by [email protected] on 7 Dec 2012 at 1:09

Attachments:

Hilight and Clipboard in Input and Textarea

This is a pretty lofty feature request given the scope of the project, but it 
would be nice if the textarea and input widgets supported the clipboard. It 
looks like there is clipboard support in pygame here 
http://pygame.org/docs/ref/scrap.html but the API will be changing soon.


Original issue reported on code.google.com by [email protected] on 26 Mar 2011 at 4:25

random crash due to NoneType

Not 100% reproducible, but it occurs once every 20, 30 times.  I've created 
Buttons, and when the issues comes up, it comes up when you click on a Button.  
The python error messages are:

====================================
  File "somefile.py", line 45, in run
    self.app.event(e)
  File "...\gui\app.py", line 159, in event
    container.Container.event(self, ev)
  File "...\gui\container.py", line 189, in event
    used = w._event(sub)
  File "...\gui\widget.py", line 305, in _event
    return self.event(e)
  File "...\gui\theme.py", line 341, in func
    r = m(sub)
  File "...\gui\container.py", line 163, in event
    used = w._event(sub)
  File "...\gui\widget.py", line 305, in _event
    return self.event(e)
  File "...\gui\theme.py", line 337, in func
    'pos':(e.pos[0]-rect.x,e.pos[1]-rect.y),
AttributeError: 'NoneType' object has no attribute 'x'
=============================
Where i've replaced actual path with "..." or "somepath".

Like I said, usually the code runs; but once every 20 or 30 times, it crashes 
thus.

This is Windows 7 I'm using.

I'm curious, if this is something you have observed before?  Like if I should 
lower or increase the wait time in pygame.time.wait(20) in the main event loop.

Could you suggest a workaround to this, perhaps?  I'd be open to something like 
catching the error or something.  Thank you in advance.

Original issue reported on code.google.com by [email protected] on 12 Jan 2011 at 7:57

Input crashes when pressing UP/DOWN (Includes FIX)

What steps will reproduce the problem?
1. Open Example "Gui5"
2. click in the input field
3. press up (or down) key on keyboard

What is the expected output? What do you see instead?
Expected is jumping to above/below field. Crashes instead...

What version of the product are you using? On what operating system?
using version 18 on Mac OS

Please provide any additional information below.
To fix this issue edit "input.py" moving the try to line 91 so that line 95 "c 
= (e.unicode).encode('latin-1')" is within the try block :)
At least this fixed the problem for me :D

I did attach the modified input.py

Original issue reported on code.google.com by [email protected] on 14 Jul 2013 at 7:30

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.