On 19 Aug 2006 at 15:12, Alex Holkner wrote: > Lenard Lindstrom wrote: > > >The following: > > > > event = pygame.event.poll() > > > >raises this exception: > > > >.... > > File "C:\prg\pygame-ctypes-0.08\pygame\event.py", line 168, in poll > > return Event(0, sdl_event=event, keep_userdata=True) > > File "C:\prg\pygame-ctypes-0.08\pygame\event.py", line 455, in > >__init__ > > if uevent.code == _USEROBJECT_CHECK1 and \ > >AttributeError: 'int' object has no attribute 'value' > > > > > Thanks. I've fixed this in SVN, but it would be _very_ helpful if next > time you could provide some more information. For example, providing > the complete traceback and a link to your source would be perfect, as it > allows me to debug the problem myself, rather than guessing the cause. > Yes, after posting the first message I found it was not just the pygame.event.poll() call that caused the error. Here is a short program that does. It is the custom event that does it.
import pygame from pygame.locals import * screen = pygame.display.set_mode((500, 400)) START = pygame.event.Event(USEREVENT + 1) pygame.event.post(START) event = pygame.event.wait() while event.type != NOEVENT: event_type = event.type if event_type == QUIT: break event = pygame.event.poll() Lenard Lindstrom <[EMAIL PROTECTED]>