From: Waclawczyk J. <Jan...@ic...> - 2001-05-17 07:13:37
|
Hello, I've got following problem: from javax.swing import JButton, JComboBox from java.awt import * def action(e): print "test" button = Button("Press") button.actionPerformed = action # IT WORKS cb = JComboBox(["VAL1"]) cb.actionPerformed = action # ERROR Traceback (innermost last): File "<console>", line 1, in ? TypeError: can't assign to this attribute in java instance: actionPerformed #but the following works class AL(ActionListener): def actionPerformed(self, e): print "jan" al = AL() cb.addActionListener(al) Is this a bug? Regards Janusz Waclawczyk |