FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Bugs
   Bug Fixes, Implemented Suggestions
(Moderator: fry)
   loadStrings()
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: loadStrings()  (Read 362 times)
benelek

35160983516098 WWW Email
loadStrings()
« on: Jan 30th, 2003, 1:45am »

 there seems to be a problem with the loadStrings() method if called from within a class constructor. i haven't done a whole lot of playing about to see if there's a workaround, but it's definately the loadStrings() part that's generating the errors, and it works fine from just within setup() minus the class.
 
  a whole lot of red java errors are given. try the following (dont forget to put a file in the data directory):
 
Code:

void setup() {
  size(200,200);
  //works fine here:
  //String input[] = loadStrings("test file.CSV");
  moo noodle = new moo();
}
 
void loop() {
  
}
 
class moo {
  moo() {
    //error generated here:
    String input[] = loadStrings("test file.CSV");
  }
}
« Last Edit: Jan 30th, 2003, 1:46am by benelek »  
Glen Murphy

WWW Email
Re: loadStrings()
« Reply #1 on: Jan 30th, 2003, 3:56am »

Proce55ing has errors whenever you try to use p5-functions in constructors.  
 
hey look, this response has been sitting here in a backgrounded window for two hours, and I forgot to press post. oops.
 
benelek

35160983516098 WWW Email
Re: loadStrings()
« Reply #2 on: Jan 30th, 2003, 9:20am »

hey, one of the best features of this board is that it doesnt have to log u out after 10 minutes
 
fry


WWW
Re: loadStrings()
« Reply #3 on: Sep 18th, 2003, 4:15am »

fixed a couple releases back with the new compiler.
 
Pages: 1 

« Previous topic | Next topic »