Message191
For some reason, if a Java class defines a method 'public String getName()',
then
it breaks the getName() method on its class object. For example, the following
program:
import java.awt.Button
b = java.awt.Button('hi')
c = b.getClass()
print c
print c.getName()
Fails with the output:
java.awt.Button
Traceback (innermost last):
File "/tmp/bug.py", line 6, in ?
TypeError: getName(): expected 1 args; got 0
Other methods of the class object work (e.g., getDeclaredConstructors()), and
b.getName() works.
I have no idea of a cause or solution (although in my case it's easy to work
around
since "'%s' % c" gives me the name of the class).
|
|
Date |
User |
Action |
Args |
2008-02-20 17:16:44 | admin | link | issue222871 messages |
2008-02-20 17:16:44 | admin | create | |
|