Bug 1575 : loadStrings doesnt search data folder when outside built-in functions
Last modified: 2010-06-06 07:32




Status:
RESOLVED
Resolution:
INVALID -
Priority:
P2
Severity:
normal

 

Reporter:
pixelPusher
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2010-06-05 16:41
i used the following code

String lines[] = loadStrings("cycles.txt");
void setup() {
println("there are " + lines.length + " lines");
}
void draw() {
}

with cycles.txt in sketch DATA folder, but P5 didn't find it.
i monitord file access using procMon and saw P5 was looking for the file
at following
(i simplified the) locations.
cycles.txt p5 root solved this.

.\processing-1.1\null\data\cycles.txt
.\processing-1.1\cycles.txt
%TEMP%\build8230095936349216342.tmp\data\cycles.txt
.\processing-1.1\lib\data\cycles.txt
%temp%\cycles.txt
.\processing-1.1\lib\cycles.txt
.\processing-1.1\null\data\cycles.txt
.\processing-1.1\cycles.txt


win7/64bit
Additional Comment #1 From fry 2010-06-06 07:32
never use loadStrings() outside of setup(), draw(), or a function called by
them.