From: Jeff E. <JEm...@lg...> - 2004-01-13 16:20:58
|
If you change your Java class not to extend PyObject, then your examples work. -----Original Message----- From: Nicola de Candussio [mailto:nde...@rs...] Sent: Tuesday, January 13, 2004 8:00 AM To: Samuele Pedroni Cc: jyt...@li... Subject: Re: [Jython-users] Emulating Jython object attribute access with a Java class So I guess it is not recommended to provide Jython object attribute access with a Java in the way suggested by the FAQ (maybe it should be mentioned in the FAQ). Is there any better way to do it? More generally which kind of jython functionalities a java class can safely implement ? I think of all the methods that are mentioned in several books and e-mails (__finditem__ etc& etc&) Is there any official commitment about them ? Thanks in advance Nicola Samuele Pedroni wrote: > At 13:52 13.01.2004 +0100, Nicola de Candussio wrote: > >> Hi all, >> >> I followed the instructions mentioned in the 5.2 point of the Jython >> faq (Emulating Jython object attribute access with a Java class) and >> redefined the __findattr__ method. >> It worked just fine until .... I inherited the java class in a jython >> one which gave me an unexpected result: the properties defined in the >> java class are still accessible BUT only from outside the inherited >> the jython class i.e. I cannot get the value of the attribute of the >> base class within the inherited jython class ... nor by using the >> notation self.property of by referring directly to the base class... >> I include the code of the two classes > > > there is no real designed support for subclassing PyObject subclasses. > > > ------------------------------------------------------- > This SF.net email is sponsored by: Perforce Software. > Perforce is the Fast Software Configuration Management System offering > advanced branching capabilities and atomic changes on 50+ platforms. > Free Eval! http://www.perforce.com/perforce/loadprog.html > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |