[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] pygame.error: video system not initialized



On 5/21/10, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
> Hi,
>
> Check the if statements in the checkForHotkey function in main.py. In
> particular, look at the last else clause.
Well, it was not doing anything anyway, so I commented it out. The
error is now gone, but my ctrl-down is still acting very strangely,
acting like I had hit alt-tab or another keystroke to switch focus out
of the pygame window and into the window behind it. Very odd. Thanks;
at least the video system is being initialized, though I do not quite
follow what was going on.
>
> Lenard
>
>
> Alex Hall wrote:
>> On 5/21/10, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
>>
>>> Hi Alex and Jake,
>>>
>>> Passing the display surface around is not the problem. In fact it is
>>> good style to keep a reference and pass it to other functions as an
>>> argument. It lets you reuse those functions for other surfaces if you
>>> want. I agree with Jake about seeing  the complete program before
>>> hazarding a guess. It could be something as trivial as calling
>>> pygame.event.get() after pygame.quit():
>>>
>> The zip file is at
>> http://www.gateway2somewhere.com/bs.zip
>> There is no dependency other than pyGame for now, except for in
>> speech.py which relies on win32 extensions. You can safely replace
>> every "from speech import speak" line with this method:
>> def speak(text):
>>  pygame.display.set_caption(text)
>> #end def
>> to avoid any dependencies you do not have.
>> I do not think I am calling quit too early. I call quit, but in an if
>> statement that checks for the quit event or the escape key.
>>
>
>


-- 
Have a great day,
Alex (msg sent from GMail website)
mehgcap@xxxxxxxxx; http://www.facebook.com/mehgcap