jmtan
14-01-2008 14:31:28
Hi, is anyone using buffered input for OIS in their projects? I saw that the tutorial for buffered input in the wiki is incomplete, does this mean that buffered input has known problems?
Using the code above, the application starts running, but when I press a key it suddenly gives me an error on "self.keyboard.capture() in frameStarted(), saying "Nonetype object is not callable".
Admittedly, I've not used OIS Bufferedinput in C++, so my usage might be wrong. Can someone shed some light here?
class GameListener(ogre.FrameListener, OIS.KeyListener):
def __init__(self, keyboard, window):
ogre.FrameListener.__init__(self)
OIS.KeyListener.__init__(self)
self.keyboard = keyboard
self.keyboard.setBuffered(True)
self.keyboard.setEventCallback(self)
self.renderWindow = window
def keyPressed(self, evt):
print evt
return True
def frameStarted(self, evt):
if self.renderWindow.isClosed():
return False
self.keyboard.capture()
return True
Using the code above, the application starts running, but when I press a key it suddenly gives me an error on "self.keyboard.capture() in frameStarted(), saying "Nonetype object is not callable".
Admittedly, I've not used OIS Bufferedinput in C++, so my usage might be wrong. Can someone shed some light here?