On 3/8/08, Juan Jose Alonso <[EMAIL PROTECTED]> wrote:
>
>  Hello goys, recently i discover that my engine structure dont run fine
>  here in pyglet, my engine loop change the scenes capturing a
>  ChangeScene, is a elegant method, then i have this..
>
>     def run(self, scene):
>         self.scene = scene()
>         self.scene.init()
>         while not self.window.has_exit:
>             try:
>                 self.window.clear()
>                 self.window.dispatch_events()
>                 self.scene.update()
>                 self.scene.render()
>                 self.window.flip()
>                 self.clock.tick()
>             except ChangeScene, e:
>                 self.scene = e()
>                 self.scene.init()
>
>
>  i have this method for my window key press event:
>
>     def on_key_press(self, symbol, modifiers):
>         raise ChangeScene, MyNewScene
>
>
>  I discover that the exception is not captured, because i think that
>  dispath_events not the flow that call the events callbacks... then...

It should work.  Can you provide a more minimal example that
demonstrates the exception not being caught?

Alex.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to