[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Typo in docs?



> The current docs contains AFAIK a small typo in the event types. In the
> docs at:
> 
>      http://www.pygame.org/docs/ref/pygame_event.html#Event
> 
> there is a mantion of USER_EVENT, but at all other places the event is
> called USEREVENT (no underscore). Or did I miss something?

ah, thanks for keeping me honest. check the link now (+refresh)
i also added some recent insight into key.set_repeat() into the
docs. :]



> Noticed it as I'm about to start using own custom events. :-) Seems to be
> a really handy way to add stuff into the main event loop, and thus avoid
> making spaghetti of the code (ok, it's quite spahetti-like already, but
> I'd rather avoid making it more).


chackie, feel free to give us/me a report on how well this works
(or doesn't). i did some simple testing with it, and it all looks
good, but i'm curious to see how it works in the "real world" also
be aware that these custom event objects only work for events
>= USEREVENT. also, the maximum number of evetns SDL handles is
"NUMEVENTS", which is 32. i've never checked if SDL actually
works with event numbers bigger than 32, but when i looked at the
code it seemed like it should, (i'd label it "undefined")

i'd like the Event stuff to be a clean way to pass events around
in bigger projects (like yours). but without any real hands-on in
that area, its hard to know if there's any roughspots.

i also plan on allowing you to pass custom user events for any
type of event, not just the USEREVENTS. it won't be hard at this
point.


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org