Eclipse+Jython Problem
Ype Kingma
ykingma at accessforall.nl
Mon May 26 22:28:53 EDT 2003
Thomas wrote:
> Hello!
>
> I am using Eclipse´s SWT/Jface library in a Jython program and
> experience the following problem:
>
> The class WizardPage should be derived. Although the constructor of
> WizardPage is protected, it should be possible to call it with
> WizardPage.__init__(self, str). But I always get the error:
> "WizardPage has no attribute __init__ ".
> I also have a similar problem with the Wizard class, which is also not
> directly usable in Jython.
>
> from org.eclipse.jface.wizard import WizardPage
>
> class DPage(WizardPage):
>
> def __init__(self, str):
> WizardPage.__init__(self, str)
>
>
> Any ideas?
To call protected java methods you can prefix them with super__,
ie. self.super__someProtectedJavaMethod() .
See http://www.jython.org/docs/subclassing.html
I'm not sure wether super__ also works for protected
constructors, could you give it a try?
Kind regards,
Ype
--
email at xs4all.nl
More information about the Python-list
mailing list