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 › How to make a library for Processing
Page Index Toggle Pages: 1
How to make a library for Processing (Read 4281 times)
How to make a library for Processing
Nov 25th, 2007, 6:18pm
 
There's a file called "howto.txt" included in the "libraries" folder of your downloaded Processing software and all the information is there. This file will continually be updated, so it's a bad idea to post it here. If the file is unclear, let us know and we'll update it.

There are two categories of libraries: "core" libraries are a part of the Processing distribution, "contributed libraries" are developed, documented, and maintained by members of the Processing community. It's very possible that contributed libraries might make their way into the core libraries if they are well built, exceedingly useful, and if this makes sense for all people involved. We put a strong focus on the importance of clear documentation, so please put a strong effort into communicating your library to potential users by hosting a descriptive website.

If you'd like to have your library posted on the Processing website (http://processing.org/reference/libraries) please email <reas at processing dot org> and we'll make a decision about its inclusion.

The contributed libraries are one of the most important aspects of the Processing project and have an enormous impact on how people understand Processing. Libraries have been designed into the larger Processing plan to enable simple extensions of the core API in new, innovative, and unexpected directions. The libraries are the future of the project. We don't plan to grow the core library extensively.
Re: How to make a library for Processing
Reply #1 - Jun 10th, 2008, 3:09am
 
Since a few revisions the processing application has a menu item
File >> Examples >> Libraries
with tons of samples.

Is it possible to also see examples from my own library included there? For instance by having a folder processing/libraries/myLibrary/examples/<my samples>.

(I tried putting that folder in place but it didn't work... as expected Smiley )

all the best,
h
Re: How to make a library for Processing
Reply #2 - Jun 10th, 2008, 3:28am
 
hi hansi,
if you put the library into your sketchbook folder, the examples folder located next to your library will show up in the sketchbook folder. e.g. on osx processing's sketchbook folder is located in the Documents folder, and here is a folder structure how i organize my libraries. i have a libraries folder inside my sketchbook

/Documents/Processing/libraries

in there "yourLibrary" structure would look like this:

/Documents/Processing/libraries/yourLibrary
/Documents/Processing/libraries/yourLibrary/library
/Documents/Processing/libraries/yourLibrary/examples

now you can access the examples of your library from the sketchbook at

libraries/yourLibrary/examples

currently there is a consideration to make the sketchbook folder the default place for third party libraries, so that the core libraries folder remains untouched and one doesnt have to copy libraries from one processing release to another one.
best,
andi

Re: How to make a library for Processing
Reply #3 - Jun 10th, 2008, 3:59am
 
huh - nice trick,
thanks for the hint!

do you know from which processing version this works or has this always been possible?



best, hansi.
Re: How to make a library for Processing
Reply #4 - Jun 10th, 2008, 7:35am
 
sojamo wrote on Jun 10th, 2008, 3:28am:
currently there is a consideration to make the sketchbook folder the default place for third party libraries, so that the core libraries folder remains untouched and one doesnt have to copy libraries from one processing release to another one.

Good idea, I felt the pain with the latest revision!
Bad idea, I would prefer a separate folder for 3rd party libraries, and even for 3rd party sketches we try on our computer: I like to have a sketchbook with only my own code, so I can easily do a backup without inflating it with foreign code.
I hope you will leave that as an option at least.
Re: How to make a library for Processing
Reply #5 - Jun 10th, 2008, 10:22am
 
You can always create folders in your sketchbook directory, have one called "myCode" and another for "othersCode" and things should still work, you'll get the extra folders as menu options in the sketchbook menu.
Re: How to make a library for Processing
Reply #6 - Jun 10th, 2008, 12:50pm
 
Yes, I have already that, somehow: my main sketches at the main level, quick experiments grouped in a sub folder. Your proposal can be a usable workaround, at the cost of an additional indirection/level in the load menu.
Re: How to make a library for Processing
Reply #7 - Jun 10th, 2008, 4:29pm
 
closing this thread--this should have been locked as it's an announcement about how to make a library for processing.

please start a new thread to discuss other aspects of library use. it's plenty roomy in here Smiley
Page Index Toggle Pages: 1