Hi, I'm having a problem here reading a file from a Class.
I'm working on a .glif files reader (typographic info), basically an XML reader, and I don't have any problem accessing the files (with the XMLElement constructor) from the main program but when I try to access the file from a class I get a NullPointerException. The comments are in catalan, sorry.
Here's the code:
///////////// Main program
XMLElement xml;
Lletra exemple;
void setup() {
smooth();
noStroke();
size(1200, 1200);
exemple = new Lletra("A_");
exemple.setup();
println(exemple.nodes.length);
translate(width, height/1.5);
rotate(PI);
beginShape();
for(int i = 0; i < exemple.nodes.length; i++){
if (exemple.nodes[i].tipus == null){
println("Res de res");
}else if (exemple.nodes[i].tipus.equals("curve")){
This has to be an easy question, but I've trying to figure out for a long time and i just don't get anywhere. I'm trying to open a text file in my data folder, not to read it but to write something in it. I'm trying createWriter() but this function creates a file or overwrite the existing one.
How can I open and write on an existing text file?