|
From: brian z. <bz...@zi...> - 2001-05-04 15:56:46
|
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-speak) 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. At 08:31 AM 5/4/2001 -0700, Rich Seddon wrote: >Hi, > >I've been playing with the latest jython from CVS, and I'm having some >trouble getting my code to work with it. When I attempt to call a Java method >that is overridden in a python class, but not overridden in all intermediate >python classes, I get a stack overflow. > >The following test program fails using the latest CVS, but works fine if I >pull jython using the "Release_2_1alpha1" tag: > >from javax.swing import * > >class fooFrame(JFrame): > def __init__(self): > JFrame.__init__(self) > >class barFrame(fooFrame): > def __init__(self): > fooFrame.__init__(self) > > def setSize(self, width, height): > fooFrame.setSize(self, width, height) > > >if __name__ == "__main__": > frm = barFrame() > frm.setSize(100,100) > > frm.show() > >Regards, > >Rich Seddon > >_________________________________________________________ >Do You Yahoo!? >Get your free @yahoo.com address at http://mail.yahoo.com > > >_______________________________________________ >Jython-dev mailing list >Jyt...@li... >http://lists.sourceforge.net/lists/listinfo/jython-dev |