Message165

Author bckfnn
Recipients
Date 2000-11-18.19:37:37
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
I get 
   TypeError: invalid self argument
when I try to sub class a java class which is in a package and call the java
class constructor from jpython constructor.This happens _only_ if my current
directory is the base of the package name. ie for the example below os.getcwd()
should return the directory name just below test.

This seems to work in 1.1beta3
------------------------------------------------------------------------------

Eg : 

// Java File javaParent.java in directory test
package test;
public javaParent {
	public javaParent(int x) {
        System.out.println("constructor "+x);
	}
}
//End of file

Jpython syntax to sub class from the above..
>>> from test import javaParent
>>> class pythonClass(javaParent) :
      def __init__(self,*args) :
         apply(javaParent.__init__,(self,)+args)

>>> p = pythonClass(1)
Traceback (innermost last):
   File "<console>", line 1, in ?
   File "<console>", line 3, in __init__
 TypeError: invalid self argument
History
Date User Action Args
2008-02-20 17:16:43adminlinkissue222857 messages
2008-02-20 17:16:43admincreate