[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] RenderUpdate changes in pygame 1.7?
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] RenderUpdate changes in pygame 1.7?
- From: Rene Dudfield <renesd@xxxxxxxxx>
- Date: Sat, 8 Oct 2005 18:25:31 +1000
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Sat, 08 Oct 2005 04:25:47 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=sUQugnWezM5wAIfN46JgY9OxqKZVZaHqMJMCp6IyTi4Ugr827pT6s4sEg8yEDULqgPzcZPprvUN4rSLqkfQZC3vcYf8HlOHyGVZHce4wVYT9udGMhBA5O/pJubyyW2aDFtOWLtf8PQJ7/7PXAPhfsEzXUVat/54mIiW4l0SSlZ0=
- In-reply-to: <e82307780510080010m11a7e532m@mail.gmail.com>
- References: <e82307780510080010m11a7e532m@mail.gmail.com>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hey,
yeah there were sprite changes between 1.6 and 1.7. They were
rewritten in fact.
However they were supposed to be backwards compatible(I think).
I just tried it 1.7.1 with the aliens.py example, and it iterated ok
over the group. I added to line 305:
for sp in all:
print sp
Can you please test again that it is a RenderUpdates group and not
something else? You are not subclassing RenderUpdates are you?
Cheer.
On 10/8/05, Luke Miller <dodgyville@xxxxxxxxx> wrote:
> Hello!
>
> In pygame 1.6, I have a collection of sprites in a RenderUpdate group,
> and my code looks like this:
>
> for i in myCollection:
> blah
>
> Now, in pygame 1.7 I get an error when this code is running.
> typeerror: iteration over non-sequence
>
> From my debugging, I know that at that point in the code,
> myCollection is a <RenderUpdates(3 sprites)>
>
> This code has worked perfectly in the past (on pygame 1.6) and i think
> the only difference is I'm now running python 2.4 and pygame 1.7.
>
> And I don't think anything changed my end between versions of pygame.
> Was there a change to the internal structure of some of the sprite
> groups? Is there an easy fix for this?
>
> Thanks,
> Luke
>