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.
IndexProgramming Questions & HelpSyntax Questions › Processing class libraries
Page Index Toggle Pages: 1
Processing class libraries (Read 405 times)
Processing class libraries
Jun 28th, 2008, 11:19am
 
Is it possible to create Processing class files and import them in more than one Processing application (like you do with Java classes)? If so, how do I do that?
Re: Processing class libraries
Reply #1 - Jun 28th, 2008, 1:11pm
 
Ah, this is an excellent opportunity!
I started to write an idea/suggestion along these lines, but never took time to finish it.
Your request motivated me to finish this suggestion...
I post it in the suggestion forum instead of here.
Easier code reuse in Processing
Re: Processing class libraries
Reply #2 - Jun 28th, 2008, 1:38pm
 
Thanks for the quick reply, from which i gather that the short answer to my question is: no, that is not (yet) possible.

I read the topic you mention and it looks promising. I just discovered Processing but I'm also a programmer and I'm having a hard time doing without libraries. To be honest I don't quite grasp the sketch concept yet, in fact I find it rather frustrating that I can not just save a file with the name I want in the place I want, but I'll try to figure that out once you have the library functionality in place.

Unfortunately I neither have the skills nor the time to assist you with this effort, but I'm looking forward to the result. Good luck!
Re: Processing class libraries
Reply #3 - Jun 28th, 2008, 7:37pm
 
Well, Processing first aims at beginners, so wanting to have all things in one place, neatly packed up, is a plus. And not much more constraining than Java.
Actually, it lifts constraints from Java: you type almost free code, and it takes the grudge work of putting it in a class, declaring a complex main function, instantiating the class, etc.

I am not making an effort toward my proposal. At least not unless they approve it (and I fear I lack the Antlr knowledge to implement it). I just hope they will make something along these lines!
Re: Processing class libraries
Reply #4 - Jun 29th, 2008, 11:10am
 
I guess you have a point. However, classes and objects even with multiple constructors and inheritance, is hardly for beginners. On the other hand one isn't forced to use it, if one doesn't want to. But object orientation and modularity go hand in hand and modularity without some kind of library mechanism almost defeats it's purpose.

So let's keep our fingers crossed and wait and see if your proposal is appreciated and followed up by the project maintainers.
Page Index Toggle Pages: 1