How to call a Java superclass from jpython ??

Daniel Saß sass at dresearch.de
Tue Jun 22 04:17:46 EDT 1999


"Markus A. Greiner" wrote:
> 
> Hello,
> 
> I´m trying to port some java applications into jpython.
> Now I got a problem. I´m not able to call a java superclass from
> jpython.
> Did anybody know how to call them? Here the code I´m trying to convert:
> 
> It´s from PropertiesMetalTheme.java of the JDK Metalworks example.
> In method initcolors:
> 
>         ...
>         primary1 = super.getPrimary1()
> 
> Everything I tried in jpython failed. In some other cases replacing the
> super call into a construct like:
> 
>         ...
>         ParentClass.method(self)
> 
> works fine, but in this case
> 
>         ...
>         DefaultMetalTheme.getPrimary1()
> 
> and all other constructs failed. I´m using JPython 1.1 beta 2 so
> calls like self.super__method are obsolte and didn´t work anymore.
> (I think :-)) or better I tried without success)
> 
> Thanks Markus

You try to call a protected method. This problem should be fixed in 
JPython 1.1.


-- 

Daniel Sass




More information about the Python-list mailing list