Package driver :: Module event :: Class InputEvent
[show private | hide private]
[frames | no frames]

Class InputEvent

Event --+
        |
       InputEvent


The InputEvent handles all incoming user input. It farms it out to the Player object's handleInput method.
Method Summary
  __init__(self, conn, input)
  __str__(self)
String representing the event.
  execute(self, my_engine)
This is the method that gets called after the event has been plucked off the Queue and is being handled.
    Inherited from Event
  __repr__(self)
  enqueue(self)
Enqueues the current Event in the engine's event queue for later execution.

Method Details

__str__(self)
(Informal representation operator)

String representing the event. This is useful for verbose mode where we log all the events we've handled.
Overrides:
driver.event.Event.__str__ (inherited documentation)

execute(self, my_engine)

This is the method that gets called after the event has been plucked off the Queue and is being handled. It takes a Engine object so it knows how to access things.

Exceptions that are kicked up and not handled by the event will get handled by the loop that dequeues and executes events. But in general, it's probably not a good thing to be throwing around unhandled exceptions.
Parameters:
my_engine - the Engine instance
           (type=Engine)
Overrides:
driver.event.Event.execute (inherited documentation)

Generated by Epydoc 2.0 on Wed Jan 21 21:00:06 2004 http://epydoc.sf.net