From: Edward P. <epo...@te...> - 2002-02-06 20:31:57
|
Can anyone see why this doesn't work. I have similar code elsewhere, and simple test cases work, but in my main application, I get an error: 'TypeError: javax.swing.Timer(): 2nd arg can't be coerced to java.awt.event.ActionListener' I just can't see why ... implement the interface, and send self as the reference ... just like I always do. Thanks -Ed from java.awt.event import ActionListener from javax.swing import Timer class Scanner(RTObject,ActionListener): def __init__(self,name): RTObject.__init__(self,name) self.timer=Timer(2000,self) self.timer.start() def actionPerformed(self,ev): pass |