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 › 1 Project, multiple Tabs
Page Index Toggle Pages: 1
1 Project, multiple Tabs ? (Read 541 times)
1 Project, multiple Tabs ?
Apr 3rd, 2006, 11:59am
 
hi all...

There is one thing i haven't realized till today. Is it possible to lay down codes of a programm written in Processing in multiple tabs. Like the first ist the visual code, in a second tab i set the variables and in the third i configure the input controls.

Could this be done, or does every tab stand for one project ?

Greetz
stefan
Re: 1 Project, multiple Tabs ?
Reply #1 - Apr 3rd, 2006, 1:43pm
 
It is indeed, one tab - multiple projects. If it wasn't I'd be going mad right now maintaining a six page ream of code.

Unless I'm mistaken the global variables will need to go in the first tab and everything else can go anywhere you like (I'm currently maintaining main, functions and classes tabs).
Re: 1 Project, multiple Tabs ?
Reply #2 - Apr 3rd, 2006, 6:31pm
 
globals can be anywhere, as long as they're outside a function..

i usually have the super globals in the main sketch, and globals for classes or functions in the tab-file that class or function is in.. that way i don't have to jump around the files to remove anything if that's what i want to do..

Smiley

good luck programming

-seltar
Re: 1 Project, multiple Tabs ?
Reply #3 - Apr 13th, 2006, 12:15am
 
Just discovered that if you don't have the setup in your first tab then Processing won't find the size of your applet on export. Easy to fix though.
Re: 1 Project, multiple Tabs ?
Reply #4 - Apr 25th, 2006, 6:26pm
 
Think i'm getting something wrong.

I have my void setup() {} and my void draw() {} in my first tab
and my void keys() {} in my second.

inside the void key() {} are some if(keyPressed) {} causes.

Anybody has an idea how to setup the 2nd tab to work ?

Thanx
Stefan
Re: 1 Project, multiple Tabs ?
Reply #5 - Apr 25th, 2006, 6:53pm
 
it should just work.

I'm assuming you mean void keyPressed() { } not void key() {}?
Page Index Toggle Pages: 1