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.
IndexProcessing DevelopmentLibraries,  Tool Development › Paths in libraries (for Beads)
Page Index Toggle Pages: 1
Paths in libraries (for Beads) (Read 2523 times)
Paths in libraries (for Beads)
Jun 9th, 2010, 3:46pm
 
I have what may be a dumb question here, but I'm trying to help Ollie with the Beads library. I'm at the point of trying to understand how Processing libraries handle relative paths with the data folder.

His sample loading routines aren't working for me on Linux from inside the PDE, and looking through the code, I can't for the life of me figure out why not. (On the same system, pointed at the same Processing directory, the same sketch works just fine if I run from inside Eclipse, but then Eclipse has always been a bit different in how it handles paths.)

Even stranger, this all works fine on the Mac, which doesn't make any sense to me at all.

Going through the code for Beads itself, all of them just pass a basic String. Anything obvious that might make that *not* work with the relative path? Or why this might be different path-wise on Linux PDE? (I've never seen this happen in any other library.)

I can then dig further to figure out what the fix might be in this instance.
Re: Paths in libraries (for Beads)
Reply #1 - Jun 10th, 2010, 7:15am
 
Quote:
I'm at the point of trying to understand how Processing libraries handle relative paths with the data folder.

I suppose they use pa.sketchPath, pa.dataPath() or pa.dataFile() (the last two using the first one) where pa is the reference to the PApplet calling the library.
Re: Paths in libraries (for Beads)
Reply #2 - Jun 11th, 2010, 7:52pm
 
Thanks, that's a great help, actually!

I did sort out the other issue; I was misreading an exception - going to adjust the way those exceptions are handled in the library.
Page Index Toggle Pages: 1