From: <bc...@wo...> - 2001-09-08 15:00:15
|
On Fri, 07 Sep 2001 16:21:16 +0200, you wrote: >Hi there! > >I'm facing a problem: I have a class (XMLDocument) which extends and >implements javax.swing.text.Document. I have another class (XMLElement) >which extends org.jdom.Element and implements javax.swing.text.Element. > >Well, in the XMLElement class I've got a getDocument() method that >returns in one case a javax.swing.text.Document and in the other case a >javax.swing.text.Document. Basically returning an XMLDocument should do >the trick as it can be casted to both types. > >The problem is that jython uses intermediary Java code which chokes on >this problem. Does anybody see any solution ? No. Maybe you can find a design which does not require that XMLElement is both a text and a jdom Element. Perhaps the __tojava__ method is usefull as it allow any python object to be coerced into any other java object when passed as an argument to a java method. regards, finn |