From: Robert W. B. <rb...@di...> - 2001-10-25 17:34:46
|
Hi Andres, On Thu, 25 Oct 2001, Andres Corrada-Emmanuel wrote: > On Wed, 24 Oct 2001, Robert W. Bill wrote: > > Is the stringArrayInitializedInSuperMethodCalledBefore a protected field? > > or public? > > > > Just curious because field access does not go through the proxy making > > protected fields == private. > > stringArrayInitializedInSuperMethodCalledBefore is defined as "package > private". I have run jythonc with the --package option set to the super's > package and confirmed that the package statement is correct in the > generated .java file. The error still occurs nonetheless: I cannot access > super class attributes in my Python code (which in turn is converted into > a .class file). IIRC Jython's indirection causes the actual call in this case to originate from the org.python.core package. Methods go through the proxy to act like the real package/subclass, but fields do not. In other words, your stringArray needs to be public, or you need to write an intermediate/shell java class that exposes this field (e.g. a get method). -Robert |