I'm not much of a java programmer. I really like Scala a lot more than java. If I could I'd could I'd rather make processing libraries in Scala to use in Processing. I've been able to initiate new objects from my library in Processing, but I can't yet figure out how to reach methods or fields from my Scala object. I also can't seem to pass the current PApplet into the Scala object without an error. How I did it was by copying scala-library.jar into the lib folder of Processing so it can use scalaObjects.
If I do:
new Foo();
//or
Foo bar = new Foo();
There's no problem.
But if I do:
Foo bar = new Foo();
println(bar.baz);
It says baz doesn't exist, baz is just a string.
If I do:
new Foo(this);
It says Foo(library) doesn't exist.
I'm obviously missing something, is there someone much more knowledgeable than me out there who can give me a hint?
[update] Also, I noticed that when I do this in processing:
println(new Foo());
The console prints out, library.Foo@aa233f