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 & HelpPrograms › Structure and Interface Design
Page Index Toggle Pages: 1
Structure and Interface Design (Read 521 times)
Structure and Interface Design
Mar 16th, 2010, 12:27pm
 
Hi all, I have a problem with how to create the structure of my interface.

This is in short what the user should be able to do.

The user sees a menu screen consisting of 4 shapes. They select a shape, and are taken into an 'editing' window to interact with this shape etc. Then when they are done, they return to the menu screen, and are once again able to select any one of the 4 shapes.

My main question is, is there a way to remove classes? Or do I need to remove classes? I say this because each shape consists of calling several classes. Therefore, when I select a shape I could simply call the background function and call the appropriate classes depending on which shape was selected. However, the user will be going in and out of the 'shapes' many times, so will the program slow down because it is effectively stacking these classes on top of each other? (Behind the new backgrounds each time).

I hope that makes sense. I haven't posted code, because my problem is on how best to create an interface, or a user-route through the program. As you can probably tell I have no experience with interface design in Processing.

Many thanks.
Re: Structure and Interface Design
Reply #1 - Mar 17th, 2010, 12:27am
 
Ah, by interface, you mean GUI (graphical user interface), not Java's interface...

First, you don't remove classes. You might remove instances of classes (objects), which is a bit different.
Second, in general you don't have to take care of removing objects, garbage collection is supposed to do that, if there is no memory leak.

So my advice is to do your coding. If you find out an issue (speed, memory), you should come back and show how you organized your code, particularly in object life cycle (not necessarily showing the full code, a general picture is better). We might help in improving it.
Page Index Toggle Pages: 1