We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › exporting println
Page Index Toggle Pages: 1
exporting println (Read 338 times)
exporting println
Oct 3rd, 2006, 2:03am
 
i am trying to export the println info that i have compiled, but can't seem to do so successfully.  i have tried the PrintWriter and createWirter commands.  i either recieve a [Type "writer" was not found.] or a [Type "createWriter" was not found.].

should i not be using these?  is there a better way to do this?

thanks.
Re: exporting println
Reply #1 - Oct 3rd, 2006, 7:34pm
 
what do you mean? could you post your code?
Re: exporting println
Reply #2 - Oct 3rd, 2006, 7:57pm
 
essentailly i'm trying to get the existing code that you provided to work, but i am getting those error messages.  maybe i'm missing something.  the code i've got is kind of long, but i can't seem to get this simple one to work either.

thanks.
andy




PrintWriter output;

void setup() {
 // Create a new file in the sketch directory
 output = new writer("positions.txt");
}

void draw() {
 point(mouseX, mouseY);
 output.println(mouseX);
}

void keyPressed() {
 output.flush(); // Writes the remaining data to the file
 output.close(); // Finishes the file
 exit(); // Stops the program
}
Re: exporting println
Reply #3 - Oct 3rd, 2006, 9:20pm
 
instead of:

output = new writer("positions.txt");  

that should be:

output = createWriter("positions.txt");
Page Index Toggle Pages: 1