G'day,
Hi. I'm new to jython/python and am trying to interface a jython
script with some java code that produces property change events.
Here's the jython code:
import sys;
from javax import swing;
from java.beans import PropertyChangeL istener;
from gov.nasa.gsfc.i rc.instrument import InstrumentModel Provider;
class irchooks(Proper tyChangeListene r):
def propertyChange( self, e):
print "Property Change:";
print e;
print self;
def __init__(self):
self.modelProvi der = InstrumentModel Provider.getIns tance()
self.model = self.modelProvi der.getInstrume nt("Detector")
print "Sample Rate: "
print self.model.getF ramePeriod();
self.model.addP ropertyChangeLi stener(self);
print "Generate a property change event"
self.model.setF ramePeriod(0.21 5);
Then when I try running this code from the application ( via the bean
scripting framework ), I keep getting these errors:
Sample Rate:
0.001
Traceback (innermost last):
File "<string>", line 37, in ?
File "<string>", line 33, in __init__
TypeError: propertyChange( ) too many arguments; expected 1 got 2
Exception in backgrounded command procedure: PropertChangeTe st
exception from JPython: Traceback (innermost last):
File "<string>", line 37, in ?
File "<string>", line 33, in __init__
TypeError: propertyChange( ) too many arguments; expected 1 got 2
: Traceback (innermost last):
File "<string>", line 37, in ?
File "<string>", line 33, in __init__
TypeError: propertyChange( ) too many arguments; expected 1 got 2
Huh? Any ideas?
Thanks.
Matt Newcomb
Yerkes Observatory
373 W. Geneva St.
Williams Bay, WI
53191 0 1439 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Michael Chermside |
last post by:
Ype writes:
> For the namespaces in Jython this 'Python internal thread safety'
> is handled by the Java class:
>
> http://www.jython.org/docs/javadoc/org/python/core/PyStringMap.html
>
> which has almost all of it public methods Java synchronized:
>
>
http://cvs.sourceforge.net/viewcvs.py/jython/jython/org/python/core/PyStringMap.
|
by: Dave Benjamin |
last post by:
Hey good people,
I've been doing a lot of simultaneous Jython and CPython programming lately,
and just wanted to say, with no intended ill will toward any of the
individuals who have been generous enough to make the two languages
possible, that, well, they're kinda different.
I guess it was inevitable, but with Jython stuck at Python 2.1, it's not
really the same language as CPython is today. You still have to type "from
__future__...
|
by: angel |
last post by:
A java runtime environment includes jvm and java class (for example
classes.zip in sun jre). Of course jython need jvm,but does it need java
class.
Thanx
|
by: Jan Gregor |
last post by:
Hello
I found that jython catches exact java exceptions, not their
subclasses. Is there some way to get around this limitation (or error) ?
My program has class representing database source and specialed classes
for particulars databases. Now there are two options - to include
exception (subclasses of SQLException) for every db in except (so
all drivers has to be present) or to move methods to subclasses.
|
by: scott |
last post by:
I installed darwinports and did a "sudo port install jython"
-------------------------
scott$ which jython
/opt/local/bin/jython
-------------------------
Jython works in interactive mode as shown below:
| |
by: Mark Fink |
last post by:
I wrote a Jython class that inherits from a Java class and (thats the
plan) overrides one method. Everything should stay the same.
If I run this nothing happens whereas if I run the Java class it says:
usage: java fit.FitServer host port socketTicket
-v verbose
I think this is because I do not understand the jython mechanism for
inheritance (yet).
|
by: Sloan.Kohler |
last post by:
Is Jython development dead or has it just seemed that way for over a
year?. The jython.org website has a recent new appearance (but no new
content) and there is some message traffic on the developer site at
Sourceforge. However nothing has been released for over a year (i.e.
no support for Python 2.3, 2.4 or 2.5). Is seems that IronPython may
have a better future than Jython.
I know this is a bit of a troll but I'm concerned about...
|
by: Neil Wallace |
last post by:
Hi all,
I am a novice Python/Jython programmer, and Ubuntu user.
Ubuntu still only supports only version 2.1 of Jython. I have used the
GUI installer of Jython 2.2, and installed it to the default
/root/jython2.2 directory. The install went without issues.
However, typing ............jython --version
in a teminal still gives me ........ Jython 2.1 on java (JIT: null)
|
by: sarup26 |
last post by:
Hello ..
I would like to know more about Python and Jython?
What is the difference between both of them?
What is the future for Jython and which are the areas where it is
used?
Swot
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |