ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pygame-users
pygame-users
[pygame] [BUG] pygame-ctypes
by Lenard Lindstrom other posts by this author
Aug 22 2006 3:44PM messages near this date
[pygame] [BUG] pygame-ctypes | Re: [pygame] [BUG] pygame-ctypes
While trying to run 20,000 Light Years in Space, version 1.2 I get 
the following exception:

Traceback (most recent call last):
  File "lightyears.py", line 23, in ?
    startup.Main()
  File "C:\prg\LightYears\code\startup.py", line 81, in Main
    main.Main()
  File "C:\prg\LightYears\code\main.py", line 103, in Main
    quit = Main_Menu_Loop(n, clock, screen, (width, height))
  File "C:\prg\LightYears\code\main.py", line 125, in Main_Menu_Loop
    main_menu = current_menu = menu.Menu([
  File "C:\prg\LightYears\code\menu.py", line 31, in __init__
    (discard1, discard2,
  File "C:\prg\LightYears\code\menu.py", line 149, in __Draw
    extra.Tile_Texture(surf, "greenrust.jpg", r)
  File "C:\prg\LightYears\code\extra.py", line 50, in Tile_Texture
    output.set_clip(rect)
  File "C:\PRG\PYGAME-CTYPES\CTYPES-SOC\pygame\surface.py", line 825, 
in set_cli
p
    SDL_SetClipRect(self._surf, rect)
ctypes.ArgumentError: argument 2: exceptions.TypeError: expected 
LP_SDL_Rect instance instead of _RectProxy

Since SDL_SetClipRect has argtypes defined _RectProxy's 
_as_parameter_ is not used. A from_param method will not help here 
either, as it must belong to the type object in the argtypes list, 
not the object passed as an argument.

Lenard Lindstrom
<len-l@[...].net> 
Thread:
Phil Hassey
Lenard Lindstrom
Alex Holkner
Alex Holkner
Phil Hassey
Alex Holkner

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved