|
From: Rich S. <rse...@ya...> - 2001-05-04 17:02:44
|
Hi Brian, If I understand your test program correctly, it should work when I run it for PyTestA class, and fail for PyTestB. In my case it works for both, clone() is there. What JDK version are you running? We've had some problems here before with Java not accessing protected methods properly. FWIW, I'm running JDK 1.3.1 RC2 on Linux. It is odd that you got a KeyError for my test program. I get a segfault (which may or may not be caused by a stack overflow). However, the same scenario in my real-world application definately causes an infinite recursion, I can see it in the stack trace. This is why I am suspecting a stack overflow for the test program as well. Here's my output: ~/jython-2.1a1 > ./jython test.py ./jython: line 7: 8029 Segmentation fault /usr/local/jdk1.3.1/jre/bin/java -Dpython.home=/home/rseddon/jython-2.1a1 -classpath "/home/rseddon/jython-2.1a1/jython.jar:$CLASSPATH" org.python.util.jython "$@" If I add the "setSize" method into the intermediate class it runs properly. Rich On Friday 04 May 2001 08:56, brian zimmer wrote: > Rich, > > I don't get the StackOverflow, but instead a KeyError. I'm not much of a > Swing guy, but I'm willing to bet that processInputMethodEvent is a > protected method on some object (probably JFrame). Check out my bug at > sourceforge #416871 for Jython and see what the downloadable code does for > you. I'm quite curious. I used to get the StackOverflow, but some changes > to the core fixed that, but in doing so have caused me problems with Jython > not building all the appropriate methods if I subclass (in Python-sp ak) a > Java interface. To workaround it I implement all the methods that fail > (always protected methods such as .clone() and .finalize()). I don't know > if this makes any sense to you, but love to have someone else experience > this problem. I've spoken with Finn and he is unable to reproduce it. > > thanks, > > brian > > So I went and checked the Javadoc and .processInputMethodEvent() is indeed > protected. My theory holds. > _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |