JPython question, me too (Swing)
prm
vtbl.moorepe at memo.volvo.se
Thu Aug 31 08:47:50 EDT 2000
Sorry I can't be of help Stuart, but I also have problem getting my
first example to work on a Mac.
The code (snipped) is -
class GUI:
def __init__(self):
self.frame = swing.JFrame(windowClosing=self.do_quit) # Line 69, in error
....
....
def do_quit(self, event=None):
import sys
sys.exit(0)
The error is -
File "swingex1.py", line 69, in __init__
TypeError: can't set arbitrary attribute in java instance: windowClosing
Hope someone can help, perhaps the issues are related.
When I tried changing the assignment to look like self.doquit(), I had a
very short run time! So I learnt something there.
Hope someone can shed some light,
Peter Moore
> Stuart Ford wrote:
>
> Greetings,
>
> I'm playing around with JPython now with the intention of using it to
> rapidly create Java Servlets.
>
> I have installed JPython, but can't get any of the examples to run
> properly on my machine.
>
> The interpreter can't seem to find the java package referenced in most
> standard examples,
> does anyone know why they weren't loaded during the install, and how I
> might get them
> loaded properly?
>
>
> Thanks in advance,
> Stuart
More information about the Python-list
mailing list