|
Author |
Topic: loadStrings() (Read 362 times) |
|
benelek
|
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
|
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
|
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
|
Re: loadStrings()
« Reply #3 on: Sep 18th, 2003, 4:15am » |
|
fixed a couple releases back with the new compiler.
|
|
|
|
|