I've got a script that gets a handle on an object then tries to set one of it's variables (connection) to a new Connection object.
The djava code is:
c.connection = new Connection(server.getText(),port,"firstname", "lastname", nick.getText(), true, true,new StringParser());
and In my "c" class I have:
public Connection connection;
when I execute this line in dynamic java I always get the following error:
koala.dynamicjava.interpreter.InterpreterException: L56, C25 (init.djava):
Undefined class 'connection'
What's up w/ that?
If I try to set connection as a variable for the djava script
interpreter.defineVariable("connection",connection);
and just doing a plain connection = new Connection(server.getText(),port,"firstname", "lastname", nick.getText(), true, true,new StringParser());
I always get:
koala.dynamicjava.interpreter.InterpreterException: L55, C14 (init.djava):
java.lang.NoSuchMethodException: org.moxy.net.irc.client.Connection constructor
What gives? I've imported the entire package and even the individual Connection class it doesn't seem to help. Anyone had this problem before? How can I create a Connection object in my dynamic java script?
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
BTW: If I initilize connection in my program:
public Connection connection = new Connection(...);
interpreter.defineVariable("connection",connection);
And simply try to use one of it's methods in the djava script:
connection.send("JOIN");
I get a really nast exception:
koala.dynamicjava.interpreter.error.ExecutionError: Undefined class 'connection'
at koala.dynamicjava.interpreter.NameVisitor.visit(NameVisitor.java:597)
at koala.dynamicjava.tree.QualifiedName.acceptVisitor(QualifiedName.java:123)
at koala.dynamicjava.interpreter.NameVisitor.visit(NameVisitor.java:503)
at koala.dynamicjava.tree.ObjectMethodCall.acceptVisitor(ObjectMethodCall.java:85)
at koala.dynamicjava.interpreter.NameVisitor.visitList(NameVisitor.java:
...
etc.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've got a script that gets a handle on an object then tries to set one of it's variables (connection) to a new Connection object.
The djava code is:
c.connection = new Connection(server.getText(),port,"firstname", "lastname", nick.getText(), true, true,new StringParser());
and In my "c" class I have:
public Connection connection;
when I execute this line in dynamic java I always get the following error:
koala.dynamicjava.interpreter.InterpreterException: L56, C25 (init.djava):
Undefined class 'connection'
What's up w/ that?
If I try to set connection as a variable for the djava script
interpreter.defineVariable("connection",connection);
and just doing a plain connection = new Connection(server.getText(),port,"firstname", "lastname", nick.getText(), true, true,new StringParser());
I always get:
koala.dynamicjava.interpreter.InterpreterException: L55, C14 (init.djava):
java.lang.NoSuchMethodException: org.moxy.net.irc.client.Connection constructor
What gives? I've imported the entire package and even the individual Connection class it doesn't seem to help. Anyone had this problem before? How can I create a Connection object in my dynamic java script?
Thanks.
BTW: If I initilize connection in my program:
public Connection connection = new Connection(...);
interpreter.defineVariable("connection",connection);
And simply try to use one of it's methods in the djava script:
connection.send("JOIN");
I get a really nast exception:
koala.dynamicjava.interpreter.error.ExecutionError: Undefined class 'connection'
at koala.dynamicjava.interpreter.NameVisitor.visit(NameVisitor.java:597)
at koala.dynamicjava.tree.QualifiedName.acceptVisitor(QualifiedName.java:123)
at koala.dynamicjava.interpreter.NameVisitor.visit(NameVisitor.java:503)
at koala.dynamicjava.tree.ObjectMethodCall.acceptVisitor(ObjectMethodCall.java:85)
at koala.dynamicjava.interpreter.NameVisitor.visitList(NameVisitor.java:
...
etc.