From: Jeff E. <je...@ad...> - 2001-05-17 13:46:36
|
Waclawczyk Janusch wrote: > 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 > > Is this a bug? No, its an ambiguity. JComboBox has a method named actionPerformed because it implements ActionListener. Most other classes that accept ActionListeners don't also implement ActionListener, so they don't have that problem. There are other cases where assigning to the automatic bean properties also fails because the property or event name conflicts with a method or field. The workaround would be to actually implement an ActionListener and add it to the JComboBox as you would in Java. Jeff Emanuel Landmark Graphics Corporation je...@ad... |